[Groonga-commit] droonga/http-benchmark at 14abe56 [master] Add skelton

Back to archive index

YUKI Hiroshi yuki****@clear*****
Mon Oct 7 15:25:57 JST 2013


すみません、他に合わせるという事を怠っておりました。
合わせるように修正しました。

Kouhei Sutou wrote:
>> +  parser.on("--threads=COUNT",
>> +            "count of threads") do |threads|
>> +    options[:threads] = threads.to_i
>> +  end
> 
> droongaでは設定ファイルとかでn_XXX(n_workersとか)を使って
> いるのでXXX_COUNTよりもn_XXXの方がいいです!
> 
> --n-threads=N
> The number of threads
> 
> みたいな。
> 
> In <14abe56b9e7cce01cb6029576efda00d39871e69 �� jenkins.clear-code.com>
>    "[Groonga-commit] droonga/http-benchmark �� 14abe56 [master] Add skelton" on Mon, 07 Oct 2013 14:59:13 +0900,
>    YUKI Hiroshi <null+groonga �� clear-code.com> wrote:
> 
>> YUKI Hiroshi	2013-10-07 14:59:13 +0900 (Mon, 07 Oct 2013)
>>
>>    New Revision: 14abe56b9e7cce01cb6029576efda00d39871e69
>>    https://github.com/droonga/http-benchmark/commit/14abe56b9e7cce01cb6029576efda00d39871e69
>>
>>    Message:
>>      Add skelton
>>
>>    Added files:
>>      bin/http-benchmark
>>      lib/droonga/http-benchmark.rb
>>
>>    Added: bin/http-benchmark (+29 -0) 100755
>> ===================================================================
>> --- /dev/null
>> +++ bin/http-benchmark    2013-10-07 14:59:13 +0900 (cbef2c6)
>> @@ -0,0 +1,29 @@
>> +#!/usr/bin/env ruby
>> +# -*- coding: utf-8 -*-
>> +
>> +require "droonga/http-benchmark"
>> +require "optparse"
>> +
>> +options = {}
>> +option_parser = OptionParser.new do |parser|
>> +  parser.on("--duration=SECONDS",
>> +            "duration of the benmark") do |duration|
>> +    options[:duration] = duration.to_f
>> +  end
>> +  parser.on("--threads=COUNT",
>> +            "count of threads") do |threads|
>> +    options[:threads] = threads.to_i
>> +  end
>> +end
>> +args = option_parser.parse!(ARGV)
>> +
>> +if options[:duration].nil?
>> +  raise "You must specify the test duration by --duration option."
>> +end
>> +if options[:threads].nil?
>> +  raise "You must specify the count of request threads by --threads option."
>> +end
>> +
>> +benchmark = Droonga::HttpBenchmark.new(:duration => options[:duration],
>> +                                       :threads_count => options[:threads])
>> +benchmark.run
>>
>>    Added: lib/droonga/http-benchmark.rb (+17 -0) 100644
>> ===================================================================
>> --- /dev/null
>> +++ lib/droonga/http-benchmark.rb    2013-10-07 14:59:13 +0900 (e46358a)
>> @@ -0,0 +1,17 @@
>> +# -*- coding: utf-8 -*-
>> +
>> +class HttpBenchmark
>> +  attr_reader :duration, :threads_count
>> +
>> +  MIN_DURATION = 1.0
>> +  MAX_THREADS_COUNT = 16
>> +
>> +  def initialize(params)
>> +    @duration = [params[:duration], MIN_DURATION].max
>> +    @threads_count = [params[:threads_count], MAX_THREADS_COUNT].min
>> +  end
>> +
>> +  def run
>> +    raise "not implemented"
>> +  end
>> +end
> 
> _______________________________________________
> Groonga-commit mailing list
> Groonga-commit �� lists.sourceforge.jp
> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit
> 

-- 
結城 洋志 <YUKI Hiroshi>
E-mail: yuki �� clear-code.com

株式会社クリアコード
〒113-0033 東京都文京区本郷3-27-12
           本郷デントビル2階
TEL : 03-6231-7270
FAX : 03-6231-7271
WWW : http://www.clear-code.com/




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