This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Home
Home.ja (日本語)
BenchmarkX
BenchmarkX is standard benchmark with sexy graph using Gruff.
Install
% sudo gem install
Usage
BenchmarkX behaves almost same as standard Benchmark module(benchmark.rb).
require "benchmarkx"
BenchmarkX.bm |x| do
# set the graph's filename
x.filename = "graph.png"
# set the graph's title
x.gruff.title = "#{n} times iterations of `a = \"1\"'"
x.report("for:") {for i in 1..n; a = "1"; end} # Benchmark::measure
x.report("times:") {n.times do ; a = "1"; end}
x.report("upto:") {1.upto(n) do ; a = "1"; end}
end
This benchmark makes the following graph:

And also output standard benchmark result to STDOUT.
50000 times iterations of `a = "1"'
user system total real
for: 0.040000 0.010000 0.050000 ( 0.062325)
times: 0.030000 0.000000 0.030000 ( 0.049322)
upto: 0.050000 0.010000 0.060000 ( 0.065992)
Links
- Gruff
- BenchmarkX






