[Groonga-commit] droonga/drnbench at 87358b7 [master] Report client's id

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jul 30 17:01:59 JST 2014


YUKI Hiroshi	2014-07-30 17:01:59 +0900 (Wed, 30 Jul 2014)

  New Revision: 87358b72db379f61fef4870b01e2cace78138709
  https://github.com/droonga/drnbench/commit/87358b72db379f61fef4870b01e2cace78138709

  Message:
    Report client's id

  Modified files:
    lib/drnbench/client/http.rb

  Modified: lib/drnbench/client/http.rb (+7 -3)
===================================================================
--- lib/drnbench/client/http.rb    2014-07-30 16:30:33 +0900 (8e91286)
+++ lib/drnbench/client/http.rb    2014-07-30 17:01:59 +0900 (92f84ec)
@@ -23,11 +23,15 @@ module Drnbench
 
     SUPPORTED_HTTP_METHODS = ["GET", "POST"]
 
+    @@count = 0
+
     def initialize(params, config)
       @requests = params[:requests]
       @result   = params[:result]
       @config   = config
       @count    = 0
+      @id       = @@count
+      @@count += 1
     end
 
     def run
@@ -51,14 +55,14 @@ module Drnbench
               :request => request,
               :status => response.code,
               :elapsed_time => Time.now - start_time,
-              :index => @count,
+              :index => "#{@id}-#{@count}",
             }
           rescue Timeout::Error
             @result << {
               :request => request,
               :status => "0",
               :elapsed_time => Time.now - start_time,
-              :index => @count,
+              :index => "#{@id}-#{@count}",
             }
           end
           @last_request = nil
@@ -78,7 +82,7 @@ module Drnbench
           :request => @last_request,
           :status => "0",
           :elapsed_time => Time.now - @last_start_time,
-          :index => "#{@count}(last)",
+          :index => "#{@id}-#{@count}(last)",
         }
       end
     end
-------------- next part --------------
HTML����������������������������...
Download 



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