Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.188
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby20 /
share /
ri /
2.0.0 /
system /
Benchmark /
Delete
Unzip
Name
Size
Permission
Date
Action
Tms
[ DIR ]
drwxr-xr-x
2026-05-01 04:24
benchmark-c.ri
2.03
KB
-rw-r--r--
2023-07-26 17:38
benchmark-i.ri
2.03
KB
-rw-r--r--
2023-07-26 17:38
bm-c.ri
1.06
KB
-rw-r--r--
2023-07-26 17:38
bm-i.ri
1.06
KB
-rw-r--r--
2023-07-26 17:38
bmbm-c.ri
1.85
KB
-rw-r--r--
2023-07-26 17:38
bmbm-i.ri
1.85
KB
-rw-r--r--
2023-07-26 17:38
cdesc-Benchmark.ri
4.86
KB
-rw-r--r--
2023-07-26 17:38
measure-c.ri
375
B
-rw-r--r--
2023-07-26 17:38
measure-i.ri
375
B
-rw-r--r--
2023-07-26 17:38
realtime-c.ri
346
B
-rw-r--r--
2023-07-26 17:38
realtime-i.ri
346
B
-rw-r--r--
2023-07-26 17:38
Save
Rename
U:RDoc::NormalModule[iI"Benchmark:EF@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"JThe Benchmark module provides methods to measure and report the time ;TI"used to execute Ruby code.;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[ o; ;[I"FMeasure the time to construct the string given by the expression ;TI" <code>"a"*1_000_000</code>:;T@o:RDoc::Markup::Verbatim;[I"require 'benchmark' ;TI" ;TI".puts Benchmark.measure { "a"*1_000_000 } ;T:@format0o; ;[I">On my machine (FreeBSD 3.2 on P5, 100MHz) this generates:;T@o;;[I"11.166667 0.050000 1.216667 ( 0.571355) ;T;0o; ;[I"FThis report shows the user CPU time, system CPU time, the sum of ;TI"Hthe user and system CPU times, and the elapsed real time. The unit ;TI"of time is seconds.;T@o;;0;[o; ;[I";Do some experiments sequentially using the #bm method:;T@o;;[ I"require 'benchmark' ;TI" ;TI"n = 50000 ;TI"Benchmark.bm do |x| ;TI"0 x.report { for i in 1..n; a = "1"; end } ;TI"0 x.report { n.times do ; a = "1"; end } ;TI"0 x.report { 1.upto(n) do ; a = "1"; end } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"0 user system total real ;TI"11.033333 0.016667 1.016667 ( 0.492106) ;TI"11.483333 0.000000 1.483333 ( 0.694605) ;TI"11.516667 0.000000 1.516667 ( 0.711077) ;T;0o;;0;[o; ;[I"AContinuing the previous example, put a label in each report:;T@o;;[ I"require 'benchmark' ;TI" ;TI"n = 50000 ;TI"Benchmark.bm(7) do |x| ;TI": x.report("for:") { for i in 1..n; a = "1"; end } ;TI": x.report("times:") { n.times do ; a = "1"; end } ;TI": x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"9 user system total real ;TI":for: 1.050000 0.000000 1.050000 ( 0.503462) ;TI":times: 1.533333 0.016667 1.550000 ( 0.735473) ;TI":upto: 1.500000 0.016667 1.516667 ( 0.711239) ;T;0o;;; ;[o;;0;[o; ;[ I"FThe times for some benchmarks depend on the order in which items ;TI"?are run. These differences are due to the cost of memory ;TI"Fallocation and garbage collection. To avoid these discrepancies, ;TI"Dthe #bmbm method is provided. For example, to compare ways to ;TI"sort an array of floats:;T@o;;[ I"require 'benchmark' ;TI" ;TI"'array = (1..1000000).map { rand } ;TI" ;TI"Benchmark.bmbm do |x| ;TI"- x.report("sort!") { array.dup.sort! } ;TI"- x.report("sort") { array.dup.sort } ;TI" end ;T;0o; ;[I"The result:;T@o;;[ I"9Rehearsal ----------------------------------------- ;TI"9sort! 11.928000 0.010000 11.938000 ( 12.756000) ;TI"9sort 13.048000 0.020000 13.068000 ( 13.857000) ;TI"9------------------------------- total: 25.006000sec ;TI" ;TI"8 user system total real ;TI"9sort! 12.959000 0.010000 12.969000 ( 13.793000) ;TI"9sort 12.007000 0.000000 12.007000 ( 12.791000) ;T;0o;;0;[o; ;[I"EReport statistics of sequential experiments with unique labels, ;TI"!using the #benchmark method:;T@o;;[I"require 'benchmark' ;TI"Jinclude Benchmark # we need the CAPTION and FORMAT constants ;TI" ;TI"n = 50000 ;TI"HBenchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| ;TI"? tf = x.report("for:") { for i in 1..n; a = "1"; end } ;TI"? tt = x.report("times:") { n.times do ; a = "1"; end } ;TI"? tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } ;TI" [tf+tt+tu, (tf+tt+tu)/3] ;TI" end ;T;0o; ;[I"The result:;T@o;;[I"9 user system total real ;TI":for: 1.016667 0.016667 1.033333 ( 0.485749) ;TI":times: 1.450000 0.016667 1.466667 ( 0.681367) ;TI":upto: 1.533333 0.000000 1.533333 ( 0.722166) ;TI":>total: 4.000000 0.033333 4.033333 ( 1.889282) ;TI"9>avg: 1.333333 0.011111 1.344444 ( 0.629761);T;0: @fileI"lib/benchmark.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [U:RDoc::Constant[i I"BENCHMARK_VERSION;FI"!Benchmark::BENCHMARK_VERSION;F00o;;[ ;@�;0@�@cRDoc::NormalModule0U;[i I"CAPTION;FI"Benchmark::CAPTION;F00o;;[o; ;[I"AThe default caption string (heading above the output times).;T;@�;0@�@@�0U;[i I"FORMAT;FI"Benchmark::FORMAT;F00o;;[o; ;[I"VThe default format string used to display times. See also Benchmark::Tms#format.;T;@�;0@�@@�0[ [[I" class;T[[:public[ [I"benchmark;FI"lib/benchmark.rb;T[I"bm;F@�[I" bmbm;F@�[I"measure;F@�[I" realtime;F@�[:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [@�@�[@�@�[@�@�[@�@�[@�@�[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@�@�cRDoc::TopLevel