60件ヒット
[1-60件を表示]
(0.237秒)
ライブラリ
- ビルトイン (60)
クラス
- Thread (16)
モジュール
-
GC
:: Profiler (44)
キーワード
- clear (11)
-
raw
_ data (11) -
report
_ on _ exception (8) -
report
_ on _ exception= (8) - result (11)
検索結果
先頭5件
-
GC
:: Profiler . report(out = $ stdout) -> nil (26108.0) -
GC::Profiler.result の結果を out に出力します。
...am out 結果の出力先を指定します。デフォルトは $stdout です。
//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.report
# => GC 4 invokes.
# Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)
#... -
Thread
. report _ on _ exception -> bool (14121.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...false です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これ......* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れた......されていて
終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかど......true です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これ... -
Thread
. report _ on _ exception=(newstate) (14121.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...false です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これ......* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れた......されていて
終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかど......true です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これ... -
GC
:: Profiler . clear -> nil (8013.0) -
蓄積している GC のプロファイル情報をすべて削除します。
...ファイル情報をすべて削除します。
例:
GC::Profiler.enable
GC.start
GC.start
GC::Profiler.report #=> 2 回分の GC のプロファイル情報出力する。
GC::Profiler.clear
GC.start
GC::Profiler.report #=> 1 回分の GC のプロファイル情報出力する。... -
GC
:: Profiler . raw _ data -> [Hash , . . . ] | nil (8007.0) -
GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。
...IL を有効にして Ruby をビルドした場合、以下の
キーも参照できます。
* :GC_MARK_TIME
* :GC_SWEEP_TIME
* :ALLOCATE_INCREASE
* :ALLOCATE_LIMIT
* :HEAP_USE_SLOTS
* :HEAP_LIVE_OBJECTS
* :HEAP_FREE_OBJECTS
* :HAVE_FINALIZE
@see GC::Profiler.report, GC::Profiler.result... -
GC
:: Profiler . result -> String (8007.0) -
GC のプロファイル情報をフォーマットし、文字列として返します。
...Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC の処理時間
@see GC::Profiler.report...