[Groonga-commit] droonga/http-benchmark at 6508ed5 [master] Accept both types array and hash as request patterns

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Oct 7 17:05:51 JST 2013


YUKI Hiroshi	2013-10-07 17:05:51 +0900 (Mon, 07 Oct 2013)

  New Revision: 6508ed558b5f212fd5ac99cc77c6939eed239657
  https://github.com/droonga/http-benchmark/commit/6508ed558b5f212fd5ac99cc77c6939eed239657

  Message:
    Accept both types array and hash as request patterns

  Modified files:
    lib/droonga/http-benchmark.rb

  Modified: lib/droonga/http-benchmark.rb (+8 -2)
===================================================================
--- lib/droonga/http-benchmark.rb    2013-10-07 17:03:09 +0900 (8697c80)
+++ lib/droonga/http-benchmark.rb    2013-10-07 17:05:51 +0900 (7dcc9e4)
@@ -147,8 +147,14 @@ module Droonga
       @requests = []
       @current_request = 0
 
-      @request_patterns.each do |request_pattern|
-        populate_request_pattern(request_pattern)
+      if @request_patterns.is_a?(Array)
+        @request_patterns.each do |request_pattern|
+          populate_request_pattern(request_pattern)
+        end
+      else
+        @request_patterns.each do |key, request_pattern|
+          populate_request_pattern(request_pattern)
+        end
       end
 
       @requests.shuffle!
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index