PHP 8.2.31
Preview: bm-i.yaml Size: 1.06 KB
//proc/thread-self/root/opt/alt/ruby18/share/ri/1.8/system/Benchmark/bm-i.yaml

--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: report
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A simple interface to the #benchmark method, #bm is generates sequential reports with labels. The parameters have the same meaning as for #benchmark."
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'benchmark'\n\n    n = 50000\n    Benchmark.bm(7) do |x|\n      x.report("for:")   { for i in 1..n; a = "1"; end }\n      x.report("times:") { n.times do   ; a = "1"; end }\n      x.report("upto:")  { 1.upto(n) do ; a = "1"; end }\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "                    user     system      total        real\n       for:     1.050000   0.000000   1.050000 (  0.503462)\n       times:   1.533333   0.016667   1.550000 (  0.735473)\n       upto:    1.500000   0.016667   1.516667 (  0.711239)\n"
full_name: Benchmark#bm
is_singleton: false
name: bm
params: (label_width = 0, *labels) {|report| ...}
visibility: public

Directory Contents

Dirs: 3 × Files: 6

Name Size Perms Modified Actions
Job DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
Report DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
Tms DIR
- drwxr-xr-x 2024-03-03 22:50:12
Edit Download
2.06 KB lrw-r--r-- 2023-07-26 13:47:54
Edit Download
1.06 KB lrw-r--r-- 2023-07-26 13:47:54
Edit Download
1.81 KB lrw-r--r-- 2023-07-26 13:47:54
Edit Download
5.44 KB lrw-r--r-- 2023-07-26 13:47:54
Edit Download
305 B lrw-r--r-- 2023-07-26 13:47:54
Edit Download
283 B lrw-r--r-- 2023-07-26 13:47:54
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).