Devel::NYTProf - è¦ããããããã¡ã¤ã©
Perl
›
ã¢ã¸ã¥ã¼ã«
›
here
Devel::NYTProfã¯ããã°ã©ã ã®ä¸ã®ã©ã®å¦çã«æéãããã£ã¦ãããã調ã¹ããã¼ã«ã§ãããã®ãããªãã¼ã«ãã§ãããã¡ã¤ã©ã¨ããã¾ãã解æçµæãHTMLãã¡ã¤ã«ã«å¤æãã¦ãããã®ã§ãã¨ã¦ãè¦ãããã§ãã
ããããã¡ã¤ã«ãä½æããã®ã¯ç°¡åã§ãã次ã®ã³ãã³ããå®è¡ããã¨ã«ã¬ã³ããã£ã¬ã¯ããªã«ãnytprof.outãã¨ãããããã¡ã¤ã«ãæ å ±ãåºåãããã¡ã¤ã«ãä½æããã¾ãã
# ãããã¡ã¤ã«æ å ±ã®ä½æ perl -d:NYTProf target.pl
ããnytprof.outããHTMLãã¡ã¤ã«ã«å¤æããã«ã¯nytprofhtmlã³ãã³ããå®è¡ãã¾ãã
# ãããã¡ã¤ã«æ
å ±ãHTMLãã¡ã¤ã«ã«å¤æãã
nytprofhtml
ãã«ã¬ã³ããã£ã¬ã¯ããªã®ãnytprof/ããã£ã¬ã¯ããªã®ä¸ã«HTMLãã¡ã¤ã«ãä½æããã¾ãããnytprof/index.htmlããéãã¨ãããã¡ã¤ã«æ å ±ãè¦ããã¨ãã§ãã¾ãã
ãä¸è¨ã®çµæã¯ã¹ã¯ãªãããå®è¡ããå ´åã®ç§ã®ç°å¢ã§ã®çµæã§ãã
use strict; use warnings; func1(); func2(); func2(); sub func1 { my $i = 0; while ($i < 1000000) { $i++; } } sub func2 { my $i = 0; while ($i < 2000000) { $i++; } }