summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-06-11 17:27:57 +0000
committermurphy <murphy@rubychan.de>2011-06-11 17:27:57 +0000
commit15f9e0a2e3ef375cca5195a0da5086de50312517 (patch)
treea4e7aa82bb43a79db9adaed9a9deedeea59911ca /bench
parentaef2852aff433b96d865330f23e5177460f5ffcc (diff)
downloadcoderay-15f9e0a2e3ef375cca5195a0da5086de50312517.tar.gz
use real kilobyte for benchmarks
Diffstat (limited to 'bench')
-rw-r--r--bench/bench.rb6
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.