Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Ruby Programming/Reference/Objects/GC/Profiler

From Wikibooks, open books for an open world
<Ruby Programming |Reference |Objects |GC
(Redirected fromRuby Programming/Reference/Objects/IO/GC/Profiler)
This page may need to bereviewed for quality.

This is a class in 1.9 MRI

GC::Profiler.enable# ... stuffGC::Profiler.report # outputs to stdout# orreport = GC::Profiler.result # a is set to a verbose ascii stringGC::Profiler.disable # stop it</code>Note also the existence of GC.count (number of times it has run).Note that you can get a more report by setting a compiler flag <pre>GC_PROFILE_MORE_DETAIL=1

Note that the outputs "invoke Time(sec)" is actually the sum of user cpu time until that invoke occurred—i.e. a sleep 1 will result it is increasing by 0, but a busy loop for one second will result in it increasing by 1.

Retrieved from "https://en.wikibooks.org/w/index.php?title=Ruby_Programming/Reference/Objects/GC/Profiler&oldid=3427679"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp