[Groonga-commit] droonga/http-benchmark at 9c28523 [master] Add gradual runner class

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Oct 7 18:05:36 JST 2013


YUKI Hiroshi	2013-10-07 18:05:36 +0900 (Mon, 07 Oct 2013)

  New Revision: 9c28523895e7d623611d710b9743209a1be4d633
  https://github.com/droonga/http-benchmark/commit/9c28523895e7d623611d710b9743209a1be4d633

  Message:
    Add gradual runner class

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

  Modified: lib/droonga/http-benchmark.rb (+1 -0)
===================================================================
--- lib/droonga/http-benchmark.rb    2013-10-07 18:04:27 +0900 (1fbcbf0)
+++ lib/droonga/http-benchmark.rb    2013-10-07 18:05:36 +0900 (8a984f2)
@@ -1,4 +1,5 @@
 # -*- coding: utf-8 -*-
 
 require "http-benchmark/runner"
+require "http-benchmark/gradual-runner"
 require "http-benchmark/formatter"

  Added: lib/droonga/http-benchmark/gradual-runner.rb (+22 -0) 100644
===================================================================
--- /dev/null
+++ lib/droonga/http-benchmark/gradual-runner.rb    2013-10-07 18:05:36 +0900 (ecccf1f)
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+
+require "./runner"
+
+module Droonga
+  module HttpBenchmark
+    class GradualRunner
+      attr_reader :start_n_clients, :end_n_clients, :step
+
+      def initialize(params)
+        @start_n_clients = params[:start_n_clients]
+        @end_n_clients = params[:end_n_clients]
+        @step = params[:step]
+        @results = []
+        @start_n_clients.step(@end_n_clients, @step) do |n_clients|
+          benchmark = Runner.new(params.merge(:n_clients => n_clients))
+          @results << benchmark.run
+        end
+      end
+    end
+  end
+end
-------------- next part --------------
HTML����������������������������...
Download 



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