diff options
author | murphy <murphy@rubychan.de> | 2011-06-11 17:27:57 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-11 17:27:57 +0000 |
commit | 15f9e0a2e3ef375cca5195a0da5086de50312517 (patch) | |
tree | a4e7aa82bb43a79db9adaed9a9deedeea59911ca | |
parent | aef2852aff433b96d865330f23e5177460f5ffcc (diff) | |
download | coderay-15f9e0a2e3ef375cca5195a0da5086de50312517.tar.gz |
use real kilobyte for benchmarks
-rw-r--r-- | bench/bench.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bench/bench.rb b/bench/bench.rb index 48de81a..00fe8b2 100644 --- a/bench/bench.rb +++ b/bench/bench.rb @@ -9,14 +9,14 @@ LIBDIR = Pathname.new(MYDIR).join('..', 'lib').cleanpath.to_s $:.unshift MYDIR, LIBDIR require 'coderay' -@size = ARGV.fetch(2, 100).to_i * 2**10 # 2**10 = 1 Ki +@size = ARGV.fetch(2, 100).to_i * 1000 lang = ARGV.fetch(0) do puts <<-HELP Usage: - ruby bench.rb (c|ruby|dump) (null|text|tokens|count|statistic|yaml|html) [SIZE in KB] [stream] + ruby bench.rb (c|ruby|dump) (null|text|tokens|count|statistic|yaml|html) [size in kB] [stream] - SIZE defaults to 100. + SIZE defaults to 100 kB (= 100,000 bytes). SIZE = 0 means the whole input. SIZE is ignored when dump is input. |