[Groonga-commit] droonga/drnbench at ce7fd1a [master] Handle timeout error

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jul 30 16:30:13 JST 2014


YUKI Hiroshi	2014-07-30 16:30:13 +0900 (Wed, 30 Jul 2014)

  New Revision: ce7fd1a40cd96aa6cd682943833e31bb0c046639
  https://github.com/droonga/drnbench/commit/ce7fd1a40cd96aa6cd682943833e31bb0c046639

  Message:
    Handle timeout error

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

  Modified: lib/drnbench/client/http.rb (+9 -0)
===================================================================
--- lib/drnbench/client/http.rb    2014-07-30 13:45:41 +0900 (7bb9d53)
+++ lib/drnbench/client/http.rb    2014-07-30 16:30:13 +0900 (07d083f)
@@ -45,6 +45,7 @@ module Drnbench
           start_time = Time.now
           @last_request = request
           @last_start_time = start_time
+          begin
           response = client.request(request)
           @result << {
             :request => request,
@@ -52,6 +53,14 @@ module Drnbench
             :elapsed_time => Time.now - start_time,
             :index => @count,
           }
+          rescue Timeout::Error
+            @result << {
+              :request => request,
+              :status => "0",
+              :elapsed_time => Time.now - start_time,
+              :index => @count,
+            }
+          end
           @last_request = nil
           @last_start_time = nil
           @count += 1
-------------- next part --------------
HTML����������������������������...
Download 



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