[Groonga-commit] droonga/http-benchmark at 6d600c2 [master] Don't output results to the stdout by default

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Oct 9 16:32:43 JST 2013


YUKI Hiroshi	2013-10-09 16:32:43 +0900 (Wed, 09 Oct 2013)

  New Revision: 6d600c208540ef62d578b02587581eedd2da8aa1
  https://github.com/droonga/http-benchmark/commit/6d600c208540ef62d578b02587581eedd2da8aa1

  Message:
    Don't output results to the stdout by default

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

  Modified: lib/droonga/http-benchmark/gradual-runner.rb (+12 -4)
===================================================================
--- lib/droonga/http-benchmark/gradual-runner.rb    2013-10-09 16:26:36 +0900 (1a29e3e)
+++ lib/droonga/http-benchmark/gradual-runner.rb    2013-10-09 16:32:43 +0900 (271cd6a)
@@ -5,7 +5,8 @@ require "droonga/http-benchmark/runner"
 module Droonga
   module HttpBenchmark
     class GradualRunner
-      attr_reader :start_n_clients, :end_n_clients, :step
+      attr_reader :start_n_clients, :end_n_clients, :step,
+                    :report_progressively, :result
 
       DEFAULT_START_N_CLIENTS = 1
       DEFAULT_END_N_CLIENTS = 1
@@ -15,12 +16,13 @@ module Droonga
         @start_n_clients = params[:start_n_clients] || DEFAULT_START_N_CLIENTS
         @end_n_clients = params[:end_n_clients] || DEFAULT_END_N_CLIENTS
         @step = params[:step] || DEFAULT_STEP
+        @report_progressively = params[:report_progressively] || false
         @params = params
       end
 
       def run
         run_benchmarks
-        puts****@resul*****_csv
+        @result
       end
 
       private
@@ -28,8 +30,14 @@ module Droonga
         @result = Result.new
         @start_n_clients.step(@end_n_clients, @step) do |n_clients|
           benchmark = Runner.new(@params.merge(:n_clients => n_clients))
-          puts "Running benchmark with #{n_clients} clients..."
-          @result << benchmark.run
+          if @report_progressively
+            puts "Running benchmark with #{n_clients} clients..."
+          end
+          benchmark.run
+          if @report_progressively
+            puts benchmark.result.to_s
+          end
+          @result << benchmark.result
         end
       end
 

  Modified: lib/droonga/http-benchmark/runner.rb (+0 -1)
===================================================================
--- lib/droonga/http-benchmark/runner.rb    2013-10-09 16:26:36 +0900 (0dcbe58)
+++ lib/droonga/http-benchmark/runner.rb    2013-10-09 16:32:43 +0900 (585429c)
@@ -44,7 +44,6 @@ module Droonga
 
       def run
         process_requests
-        puts****@resul*****_s
         @result
       end
 
-------------- next part --------------
HTML����������������������������...
Download 



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