-
Notifications
You must be signed in to change notification settings - Fork 420
/
.template.debug.html
90 lines (79 loc) · 2.61 KB
/
.template.debug.html
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
<html>
<head>
<title>Credo Debug Log</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<style>
* {
box-sizing: border-box;
font-family: Arial, sans-serif;
}
code {
font-family: 'Courier New', Courier, monospace;
color: #c55953;
}
</style>
</head>
<body>
<h1>Experimental Credo Debug Log</h1>
<p>
Analysis in
<code>
<%= File.cwd!() %>
</code> took
<strong><%= @time_total %> ms</strong> (<%= @time_load %> ms to load, <%= @time_run %> ms running checks)
</p>
<h2>Timings</h2>
<p>
Please note that these are cumulative timings across all cores, therefore an individual file or check can account for more time than the overall time spent.
</p>
<table border="1" cellpadding="4">
<tr>
<td></td>
<th align=left>Check</th>
<th align=left>File</th>
<th align=left>Time (ms)</th>
</tr>
<tr>
<th align=left valign=top rowspan="<%= Enum.min([15, Enum.count(@file_timings)]) %>">Slowest Files</th>
<%= for {filename, time} <- Enum.take(@file_timings, 15) do %>
<td></td>
<td><%= filename %></td>
<td align=right><%= floor(time / 1000) %></td>
</tr>
<tr>
<% end %>
</tr>
<tr>
<th align=left valign=top rowspan="<%= Enum.min([15, Enum.count(@check_timings)]) %>">Slowest Checks</th>
<%= for {check, time} <- Enum.take(@check_timings, 15) do %>
<td><%= check |> to_string() |> String.replace(~r/^Elixir./, "") %></td>
<td></td>
<td align=right><%= floor(time / 1000) %></td>
</tr>
<tr>
<% end %>
</tr>
<tr>
<th align=left valign=top rowspan="<%= Enum.min([15, Enum.count(@check_file_timings)]) %>">Slowest Checks/Files</th>
<%= for {{check, filename}, time} <- Enum.take(@check_file_timings, 15) do %>
<td><%= check |> to_string() |> String.replace(~r/^Elixir./, "") %></td>
<td><%= filename %></td>
<td align=right><%= floor(time / 1000) %></td>
</tr>
<tr>
<% end %>
</tr>
<tr>
<th align=left valign=top rowspan="<%= Enum.min([15, Enum.count(@check_file_timings)]) %>">Fastest Checks/Files</th>
<%= for {{check, filename}, time} <- Enum.take(Enum.reverse(@check_file_timings), 15) do %>
<td><%= check |> to_string() |> String.replace(~r/^Elixir./, "") %></td>
<td><%= filename %></td>
<td align=right><%= floor(time / 1000) %></td>
</tr>
<tr>
<% end %>
</tr>
</table>
</body>
</html>