6件ヒット
[1-6件を表示]
(0.051秒)
種類
- 特異メソッド (4)
- インスタンスメソッド (2)
クラス
- Thread (4)
モジュール
-
GC
:: Profiler (2)
キーワード
-
report
_ on _ exception (2) -
report
_ on _ exception= (2) - result (1)
検索結果
先頭5件
-
GC
:: Profiler . report(out = $ stdout) -> nil (78649.0) -
GC::Profiler.result の結果を out に出力します。
GC::Profiler.result の結果を out に出力します。
@param 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)
# 1... -
Thread
# report _ on _ exception -> bool (42469.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th... -
Thread
# report _ on _ exception=(newstate) (42469.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th... -
Thread
. report _ on _ exception -> bool (42433.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトは 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: fro... -
Thread
. report _ on _ exception=(newstate) (42433.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトは 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: fro... -
GC
:: Profiler . result -> String (24043.0) -
GC のプロファイル情報をフォーマットし、文字列として返します。
GC のプロファイル情報をフォーマットし、文字列として返します。
プロファイル情報は、GC の発生ごとに集計します。
以下は、5 回 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 ...