262件ヒット
[1-100件を表示]
(0.065秒)
クラス
-
Benchmark
:: Tms (33) -
Zlib
:: ZStream (22)
モジュール
- Benchmark (55)
- GC (22)
-
GC
:: Profiler (44) - ObjectSpace (77)
キーワード
- FORMAT (22)
-
NEWS for Ruby 3
. 1 . 0 (3) - benchmark (11)
- bm (11)
- bmbm (11)
-
count
_ objects (11) -
count
_ objects _ size (11) -
each
_ object (44) - format (11)
- measure (11)
-
memsize
_ of _ all (11) - profile (6)
-
raw
_ data (11) - report (11)
- result (11)
- stat (22)
-
total
_ in (11) -
total
_ out (11) -
total
_ time (11)
検索結果
先頭5件
-
Benchmark
:: Tms # total -> Float (18201.0) -
合計時間。(utime + stime + cutime + cstime)
合計時間。(utime + stime + cutime + cstime) -
GC
:: Profiler . total _ time -> Float (6207.0) -
GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
...GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.total_time # => 0.0011530000000000012
//}... -
Zlib
:: ZStream # total _ in -> Integer (6201.0) -
ストリームに入力されたデータの総バイト数を返します。
ストリームに入力されたデータの総バイト数を返します。 -
Zlib
:: ZStream # total _ out -> Integer (6201.0) -
ストリームの出力したデータの総バイト数を返します。
ストリームの出力したデータの総バイト数を返します。 -
NEWS for Ruby 3
. 1 . 0 (270.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...private def foo = puts "Hello" はパースされないことに注意してください。 17398
== コマンドラインオプション
* --disable-gems は"デバッグ専用"として明示的に宣言されました。デバッグ専用以外のコードでは使用しないでください......* GC
* 新規メソッド
* GC.measure_total_time = true でGCの計測を有効にします。計測によってオーバーヘッドが発生する可能性があります。デフォルトで有効になっています。 GC.measure_total_time は現在の設定を返します。 GC.sta......t[:time] または GC.stat(:time) は、測定された時間をミリ秒で返します。 10917
* GC.total_time が計測された時間をナノ秒で返します。 10917
* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211
* Kernel
*... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (136.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...hmark::Tms#cutime
: %Y
子プロセスの system CPU time で置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます......'benchmark'
n = 50000
# これは
# Benchmark.bm(7, ">total:", ">avg:") do |x| ... end
# と同じ
Benchmark.benchmark(" "*7 + Benchmark::CAPTION,
7,
Benchmark::FORMAT,
">total:",
">avg:") do |x|
tf = x.report("f......+tt+tu)/3]
end
#=>
#
# user system total real
# for: 1.016667 0.016667 1.033333 ( 0.485749)
# times: 1.450000 0.016667 1.466667 ( 0.681367)
# upto: 1.533333 0.000000 1.533333 ( 0.722166)
# >total: 4.000000 0.033333 4.033333 ( 1.889282)
# >a... -
Benchmark
. # bm(label _ width = 0 , *labels) {|rep| . . . } -> [Benchmark :: Tms] (130.0) -
Benchmark.#benchmark メソッドの引数を簡略化したものです。
...i in 1..n; a = "1"; end }
x.report { n.times do ; a = "1"; end }
x.report { 1.upto(n) do ; a = "1"; end }
end
#=>
#
# user system total real
# 1.033333 0.016667 1.016667 ( 0.492106)
# 1.483333 0.000000 1.483333 ( 0.694605)
# 1.516667 0.000000 1.516667 ( 0.7......stem total real
# for: 1.050000 0.000000 1.050000 ( 0.503462)
# times: 1.533333 0.016667 1.550000 ( 0.735473)
# upto: 1.500000 0.016667 1.516667 ( 0.711239)
//}
集計を付けた場合
//emlist[][ruby]{
require 'benchmark'
n = 50000
Benchmark.bm(7, ">total:",......tu) / 3]
end
#=>
# user system total real
# for: 0.001467 0.004727 0.006194 ( 0.006193)
# times: 0.003814 0.000000 0.003814 ( 0.003814)
# upto: 0.003855 0.000003 0.003858 ( 0.003859)
# >total: 0.009136 0.004730 0.013866 ( 0.013867)
#... -
GC
:: Profiler . raw _ data -> [Hash , . . . ] | nil (130.0) -
GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。
...GC.start
GC::Profiler.raw_data
# => [
{
:GC_TIME=>1.3000000000000858e-05,
:GC_INVOKE_TIME=>0.010634999999999999,
:HEAP_USE_SIZE=>289640,
:HEAP_TOTAL_SIZE=>588960,
:HEAP_TOTAL_OBJECTS=>14724,
:GC_IS_MARKED=>false
},
# ...
]
各項目の意......動するまでに経過した時間(秒)
: :HEAP_USE_SIZE
ヒープ内での使用サイズ(バイト)
: :HEAP_TOTAL_SIZE
ヒープ全体のサイズ(バイト)
: :HEAP_TOTAL_OBJECTS
ヒープ内に存在するオブジェクトの個数
: :GC_IS_MARKED
GC がマークフェイズ... -
GC
:: Profiler . result -> String (130.0) -
GC のプロファイル情報をフォーマットし、文字列として返します。
...回 GC が発生した場合の実行例です。
$ ruby -e "GC::Profiler.enable; a = Array.new(100000){ 'aa' }; puts GC::Profiler.result"
GC 5 invokes.
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)
1......Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC の処理時間
@see GC::Profiler.report... -
GC
. stat(key) -> Numeric (124.0) -
GC 内部の統計情報を Hash で返します。
...ed_slots=>0,
:heap_swept_slots=>0,
:heap_eden_pages=>24,
:heap_tomb_pages=>0,
:total_allocated_pages=>24,
:total_freed_pages=>0,
:total_allocated_objects=>7796,
:total_freed_objects=>83,
:malloc_increase_bytes=>2389312,
:malloc_increase_bytes_limit=>16777...