class Benchmark::Tms
A data object, representing the times associated with a benchmark measurement.
Constants
- CAPTION
-
Default caption, see also
Benchmark::CAPTION - FORMAT
-
Default format string, see also
Benchmark::FORMAT
Public Instance Methods
(untyped x) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 302
def *: (untyped x) -> untyped
(untyped other) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 312
def +: (untyped other) -> untyped
(untyped other) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 321
def -: (untyped other) -> untyped
(untyped x) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 331
def /: (untyped x) -> untyped
() { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 340
def add: () { (*untyped) -> untyped } -> untyped
() { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 350
def add!: () { (*untyped) -> untyped } -> untyped
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 355
def cstime: () -> Float
System CPU time of children
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 360
def cutime: () -> Float
User CPU time of children
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 397
def format: (?String format, *untyped args) -> String
Returns the contents of this Tms object as a formatted string, according to a format string like that passed to Kernel.format. In addition, format accepts the following extensions:
%u-
Replaced by the user CPU time, as reported by
Tms#utime. %y-
Replaced by the system CPU time, as reported by
stime(Mnemonic: y of “s_y_stem”) %U-
Replaced by the children’s user CPU time, as reported by
Tms#cutime %Y-
Replaced by the children’s system CPU time, as reported by
Tms#cstime %t-
Replaced by the total CPU time, as reported by
Tms#total %r-
Replaced by the elapsed real time, as reported by
Tms#real %n-
Replaced by the label string, as reported by
Tms#label(Mnemonic: n of “_n_ame”)
If format is not given, FORMAT is used as default value, detailing the user, system and real elapsed time.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 402
def label: () -> String
Label
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 407
def real: () -> Float
Elapsed real time
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 412
def stime: () -> Float
System CPU time
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 422
def to_a: () -> untyped
Returns a new 6-element array, consisting of the label, user CPU time, system CPU time, children’s user CPU time, children’s system CPU time and elapsed real time.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 430
def to_s: () -> String
Same as format.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/benchmark/0/benchmark.rbs, line 435
def total: () -> Float
Total time, that is utime + stime + cutime + cstime