るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.020秒)

別のキーワード

  1. logger sev_label
  2. _builtin label
  3. _builtin base_label
  4. benchmark label
  5. location label

ライブラリ

モジュール

検索結果

Benchmark.#measure(label = "") { ... } -> Benchmark::Tms (35349.0)

与えられたブロックを実行して、経過した時間を Process.#times で計り、 Benchmark::Tms オブジェクトを生成して返します。

...計り、
Benchmark
::Tms オブジェクトを生成して返します。

Benchmark
::Tms オブジェクトには to_s が定義されているので、
基本的には以下のように使います。

//emlist[][ruby]{
require 'benchmark'

puts Benchmark::CAPTION
puts Benchmark.measure { "a"*1_00...