Devel-StatProfiler
view release on metacpan or search on metacpan
share/index.tmpl view on Meta::CPAN
? my %variables = %{$_[0]};
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="statprofiler.css">
<title>StatProfiler: main report</title>
</head>
<body>
?= $variables{include}->('header', $_[0])
<div id="body-content">
? if ($variables{clickable_flamegraph}) {
<object data="<?= $variables{clickable_flamegraph} ?>" width="90%" type="image/svg+xml" style="display: block" id="zoomable_flamegraph">
SVG not supported
</object>
? }
? if ($variables{zoomable_flamegraph}) {
<object data="<?= $variables{zoomable_flamegraph} ?>" width="90%" type="image/svg+xml" style="display: none" id="clickable_flamegraph">
SVG not supported
</object>
? }
? if ($variables{clickable_flamegraph} && $variables{zoomable_flamegraph}) {
<div><a href="#" onclick="switch_flamegraph()">Switch flamegraph</a></div>
? }
<br /><br />
<table>
<caption>Subroutines, sorted by exclusive sample count</caption>
<tr>
<th>Exclusive</th>
<th>Inclusive</th>
<th>Subroutine</th>
</tr>
<? my $max_subs = scalar @{$variables{subs}} > 20 ? 20 : scalar @{$variables{subs}};
my ($sub_link, $sub_name, $file_name, $format_total_ratio) = @variables{qw(sub_link sub_name file_name format_total_ratio)};
for my $sub (@{$variables{subs}}[0..$max_subs - 1]) {
?>
<tr>
<td><?= $format_total_ratio->($sub->{exclusive}) ?></td>
<td><?= $format_total_ratio->($sub->{inclusive}) ?></td>
<td>
<a href="<?= $sub_link->($sub) ?>"><?= $sub_name->($sub->{name_pretty}) ?></a>
? if ($sub->{kind} == 2) {
(opcode)
? } elsif ($sub->{kind} == 1) {
(xsub)
? }
</td>
</tr>
? }
</table>
<a href="subs.html">All subroutines</a>
<br /><br />
<table>
<caption>Files, sorted by exclusive sample count</caption>
<tr>
<th>Exclusive</th>
<th>Report</th>
</tr>
<? my $max_files = scalar @{$variables{files}} > 20 ? 20 : scalar @{$variables{files}};
for my $file (@{$variables{files}}[0 .. $max_files - 1]) {
?>
( run in 0.493 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )