-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.latte
92 lines (83 loc) · 2.51 KB
/
content.latte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<style>
#nette-debug .xdbgpanel b {
font-weight: bold;
}
#nette-debug .xdbgpanel .nette-inner {
max-width: 100%;
max-height: 700px;
}
#nette-debug .xdbgpanel .nette-inner td.right {
text-align: right;
}
#nette-debug .xdbgpanel .nette-inner td {
white-space: nowrap;
}
#nette-debug .xdbgpanel .nette-inner .timeFast {
color: green;
}
#nette-debug .xdbgpanel .nette-inner .timeMedian {
color: orange;
}
#nette-debug .xdbgpanel .nette-inner .timeSlow {
color: red;
}
#nette-debug .xdbgpanel .nette-inner {
overflow: scroll !important;
}
</style>
<div class="xdbgpanel">
<h1>XDebugTrace</h1>
<div class="nette-inner" n:inner-foreach="$traces as $traceNo => $trace">
<table style="width:100%">
{var $indent = $indents[$traceNo]}
<thead>
<tr n:ifset="$titles[$traceNo]">
<th colspan="6"><h2>{$titles[$traceNo]} trace</h2></th>
</tr>
<tr>
<th>ID</th>
<th>Level</th>
<th>Function</th>
<th>Δ Time</th>
<th>Δ Memory</th>
<th>File (Line)</th>
</tr>
</thead>
<tbody>
<tr n:foreach="$trace as $record">
<td class="right">{$record->id}</td>
<td class="right">{$record->level}</td>
<td style="padding-left:{=($indent[$record->level] * 8) + 5}px">{$record->function}</td>
<td class="right {$record->deltaTime|timeClass}">{$record->deltaTime|time}</td>
<td class="right">{$record->deltaMemory|bytes}</td>
<td><a href="editor://open/?file={$record->filename}&line={$record->line}" title="{$record->filename}">{$record->filename|basename} (<b>{$record->line}</b>)</a> {$record->evalInfo}</td>
</tr>
</tbody>
</table>
<table style="width:100%" n:ifset="$statistics[$traceNo]" n:if="count($statistics[$traceNo]) > 1 || count($trace) > 1">
<thead>
<tr n:ifset="$titles[$traceNo]">
<th colspan="6"><h2>{$titles[$traceNo]} statistics</h2></th>
</tr>
<tr>
<th>Count</th>
<th>Δ Time</th>
<th>⌀ Time</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr n:foreach="$statistics[$traceNo] as $function => $statistic">
<td class="right">{$statistic->count}</td>
<td class="right">{$statistic->deltaTime|time}</td>
<td class="right {$statistic->averageTime|timeClass}">{$statistic->averageTime|time}</td>
<td width="100%">{$function}</td>
</tr>
</tbody>
</table>
<br n:if="!$iterator->isLast()">
</div>
<p>
Trace file size <b>{$traceFileSize|bytes:2}</b> parsed in <b>{$parsingTime|time:3}</b>
</p>
</div>