Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../usr/share/ruby
File: benchmark.rb
str.gsub!(/(%[-+.\d]*)u/) { "#{$1}f" % utime }
[500] Fix | Delete
str.gsub!(/(%[-+.\d]*)y/) { "#{$1}f" % stime }
[501] Fix | Delete
str.gsub!(/(%[-+.\d]*)U/) { "#{$1}f" % cutime }
[502] Fix | Delete
str.gsub!(/(%[-+.\d]*)Y/) { "#{$1}f" % cstime }
[503] Fix | Delete
str.gsub!(/(%[-+.\d]*)t/) { "#{$1}f" % total }
[504] Fix | Delete
str.gsub!(/(%[-+.\d]*)r/) { "(#{$1}f)" % real }
[505] Fix | Delete
format ? str % args : str
[506] Fix | Delete
end
[507] Fix | Delete
[508] Fix | Delete
#
[509] Fix | Delete
# Same as #format.
[510] Fix | Delete
#
[511] Fix | Delete
def to_s
[512] Fix | Delete
format
[513] Fix | Delete
end
[514] Fix | Delete
[515] Fix | Delete
#
[516] Fix | Delete
# Returns a new 6-element array, consisting of the
[517] Fix | Delete
# label, user CPU time, system CPU time, children's
[518] Fix | Delete
# user CPU time, children's system CPU time and elapsed
[519] Fix | Delete
# real time.
[520] Fix | Delete
#
[521] Fix | Delete
def to_a
[522] Fix | Delete
[@label, @utime, @stime, @cutime, @cstime, @real]
[523] Fix | Delete
end
[524] Fix | Delete
[525] Fix | Delete
protected
[526] Fix | Delete
[527] Fix | Delete
#
[528] Fix | Delete
# Returns a new Tms object obtained by memberwise operation +op+
[529] Fix | Delete
# of the individual times for this Tms object with those of the other
[530] Fix | Delete
# Tms object.
[531] Fix | Delete
#
[532] Fix | Delete
# +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
[533] Fix | Delete
# <tt>*</tt>, <tt>/</tt>
[534] Fix | Delete
#
[535] Fix | Delete
def memberwise(op, x)
[536] Fix | Delete
case x
[537] Fix | Delete
when Benchmark::Tms
[538] Fix | Delete
Benchmark::Tms.new(utime.__send__(op, x.utime),
[539] Fix | Delete
stime.__send__(op, x.stime),
[540] Fix | Delete
cutime.__send__(op, x.cutime),
[541] Fix | Delete
cstime.__send__(op, x.cstime),
[542] Fix | Delete
real.__send__(op, x.real)
[543] Fix | Delete
)
[544] Fix | Delete
else
[545] Fix | Delete
Benchmark::Tms.new(utime.__send__(op, x),
[546] Fix | Delete
stime.__send__(op, x),
[547] Fix | Delete
cutime.__send__(op, x),
[548] Fix | Delete
cstime.__send__(op, x),
[549] Fix | Delete
real.__send__(op, x)
[550] Fix | Delete
)
[551] Fix | Delete
end
[552] Fix | Delete
end
[553] Fix | Delete
end
[554] Fix | Delete
[555] Fix | Delete
# The default caption string (heading above the output times).
[556] Fix | Delete
CAPTION = Benchmark::Tms::CAPTION
[557] Fix | Delete
[558] Fix | Delete
# The default format string used to display times. See also Benchmark::Tms#format.
[559] Fix | Delete
FORMAT = Benchmark::Tms::FORMAT
[560] Fix | Delete
end
[561] Fix | Delete
[562] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function