YUKI Hiroshi
null+****@clear*****
Mon Oct 7 15:21:41 JST 2013
YUKI Hiroshi 2013-10-07 15:21:41 +0900 (Mon, 07 Oct 2013) New Revision: 99c29f3695bc197032af1f24134c995d6279ad73 https://github.com/droonga/http-benchmark/commit/99c29f3695bc197032af1f24134c995d6279ad73 Message: Use "n_XXX" style naming instead of "XXX_count" Modified files: bin/http-benchmark lib/droonga/http-benchmark.rb Modified: bin/http-benchmark (+4 -4) =================================================================== --- bin/http-benchmark 2013-10-07 15:20:09 +0900 (924217e) +++ bin/http-benchmark 2013-10-07 15:21:41 +0900 (8cc3eeb) @@ -10,9 +10,9 @@ option_parser = OptionParser.new do |parser| "duration of the benmark") do |duration| options[:duration] = duration end - parser.on("--threads=COUNT", Integer, - "count of threads") do |threads| - options[:threads] = threads + parser.on("--n-threads=N", Integer, + "number of threads") do |n_threads| + options[:n_threads] = n_threads end end args = option_parser.parse!(ARGV) @@ -25,5 +25,5 @@ if options[:threads].nil? end benchmark = Droonga::HttpBenchmark.new(:duration => options[:duration], - :threads_count => options[:threads]) + :n_threads => options[:n_threads]) benchmark.run Modified: lib/droonga/http-benchmark.rb (+2 -2) =================================================================== --- lib/droonga/http-benchmark.rb 2013-10-07 15:20:09 +0900 (e46358a) +++ lib/droonga/http-benchmark.rb 2013-10-07 15:21:41 +0900 (38cae7d) @@ -4,11 +4,11 @@ class HttpBenchmark attr_reader :duration, :threads_count MIN_DURATION = 1.0 - MAX_THREADS_COUNT = 16 + MAX_N_THREADS = 16 def initialize(params) @duration = [params[:duration], MIN_DURATION].max - @threads_count = [params[:threads_count], MAX_THREADS_COUNT].min + @n_threads = [params[:n_threads], MAX_N_THREADS].min end def run -------------- next part -------------- HTML����������������������������...Download