モジュール
-
GC
:: Profiler (88) - Kernel (11)
-
Profiler
_ _ (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
PROFILE
_ PROC (6) - Profiler (11)
-
Profiler
_ _ (6) - clear (11)
- disable (11)
- enable (11)
- enabled? (11)
-
print
_ profile (6) - profiler (6)
-
raw
_ data (11) - report (11)
- result (11)
-
set
_ trace _ func (11) -
start
_ profile (6) -
stop
_ profile (6) -
total
_ time (11)
検索結果
先頭5件
-
profile (44040.0)
-
Ruby プログラムのためのプロファイラです。 プロファイラとは効率改善のための調査に用いられるツールのことです。 profile ライブラリは各メソッドの実行時間に関する統計を出力します。
...
profile ライブラリは各メソッドの実行時間に関する統計を出力します。
profile はそれ自身がオーバーヘッドになる
ためメソッド呼び出しあたりの処理時間がかなり遅くなります。
=== 使い方
以下のように、ruby に -r profile......オプションを付けて実行します。
$ ruby -r profile foo.rb
foo.rb の実行が終わると標準エラー出力にプロファイルが出力されます。
プロファイルは各メソッドの実行時間に関する統計からなりますが、
この時間には大きく分......$ ruby -r profile sample/sieve.rb 1000
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 … 略 …
% cumulative self self total
time seconds seconds calls ms/call ms/call name
33.87 1.49 1.49 11 135.65 214.49 Fixnum#step
31.38... -
Profiler
_ _ . # print _ profile(file) -> () (15217.0) -
stop_profile を実行し、プロファイルの結果を file に出力します。 file には printf メソッドが定義されていなければいけません。
...stop_profile を実行し、プロファイルの結果を file に出力します。
file には printf メソッドが定義されていなければいけません。
@param file File のインスタンスを指定します。... -
Profiler
_ _ . # start _ profile -> object (15201.0) -
プロファイルの取得を開始します。
プロファイルの取得を開始します。 -
Profiler
_ _ . # stop _ profile -> nil (15201.0) -
プロファイルの取得を停止します。
プロファイルの取得を停止します。 -
Profiler
_ _ :: PROFILE _ PROC -> Proc (15201.0) -
内部で使用します。
内部で使用します。 -
Profiler
_ _ (12050.0) -
プロファイラの実装です。 Profiler__.start_profile 実行から、Profiler__.stop_profile までの 区間の実行コードのプロファイルを取得します。
...ラの実装です。
Profiler__.start_profile 実行から、Profiler__.stop_profile までの
区間の実行コードのプロファイルを取得します。
以下の使用例を参照してください。
require 'profiler'
Profiler__.start_profile
require 'tk' # このコ......ファイルが測定される
Profiler__.print_profile(STDOUT)
# =>
% cumulative self self total
time seconds seconds calls ms/call ms/call name
51.64 1.10 1.10 3 366.67 776.67 Kernel.require
17.37 1.47 0.37......e
8.92 1.66 0.19 514 0.37 0.37 Module#method_added
6.57 1.80 0.14 1 140.00 140.00 Profiler__.start_profile
4.23 1.89 0.09 15 6.00 10.67 Kernel.extend
3.29 1.96 0.07 15 4.67 4.67 Module#exte... -
profiler (12016.0)
-
プロファイラの実装です。 現在、profile ライブラリは profiler ライブラリを 利用して実装されています。
...プロファイラの実装です。
現在、profile ライブラリは profiler ライブラリを
利用して実装されています。... -
GC
:: Profiler (12000.0) -
GC の起動回数や起動したタイミング、処理時間などの GC に関するプロファイル 情報や、ヒープ全体のサイズ、ヒープ内での使用サイズやヒープ内に存在する オブジェクトの個数といった情報を扱うモジュールです。
...C の起動回数や起動したタイミング、処理時間などの GC に関するプロファイル
情報や、ヒープ全体のサイズ、ヒープ内での使用サイズやヒープ内に存在する
オブジェクトの個数といった情報を扱うモジュールです。
@see GC... -
GC
:: Profiler . result -> String (9106.0) -
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 0.012......GC invokes
GC の起動回数
: Invoke Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC......の処理時間
@see GC::Profiler.report... -
GC
:: Profiler . clear -> nil (9100.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 . disable -> nil (9100.0) -
GC のプロファイラを停止します。
...停止します。
例:
GC::Profiler.disable
GC::Profiler.enabled? #=> false
このメソッドでは、蓄積したプロファイル情報は破棄しません。
破棄したい場合は GC::Profiler.clear を呼び出してください。
@see GC::Profiler.enable, GC::Profiler.enabled?... -
GC
:: Profiler . enable -> nil (9100.0) -
GC のプロファイラを起動します。
...GC のプロファイラを起動します。
このメソッドを呼び出してから GC が発生すると、
GC についてプロファイル情報を取得します。
例:
GC::Profiler.enable
GC::Profiler.enabled? #=> true
@see GC::Profiler.disable, GC::Profiler.enabled?... -
GC
:: Profiler . enabled? -> bool (9100.0) -
GC のプロファイラを起動中であれば true、停止中であれば false を返します。
...プロファイラを起動中であれば true、停止中であれば false を返します。
例:
GC::Profiler.enabled? #=> false
GC::Profiler.enable
GC::Profiler.enabled? #=> true
GC::Profiler.disable
GC::Profiler.enabled? #=> false
@see GC::Profiler.enable, GC::Profiler.disable...