-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_report.html
More file actions
162 lines (151 loc) · 4.98 KB
/
Copy pathexample_report.html
File metadata and controls
162 lines (151 loc) · 4.98 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python sorted() Analysis</title>
<style>
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: #f5f5f5;
color: #333;
}
h1 { color: #1a73e8; margin-bottom: 0.5em; }
.card {
background: white;
border-radius: 12px;
padding: 20px;
margin: 15px 0;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.metric {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #eee;
}
.metric:last-child { border-bottom: none; }
.label { color: #666; font-weight: 500; }
.value { font-weight: 700; color: #1a73e8; font-size: 1.2em; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; color: #555; }
tr.best { background: #e8f5e9; }
.chart-container { text-align: center; margin: 20px 0; }
footer { text-align: center; color: #999; font-size: 12px; margin-top: 30px; }
</style>
</head>
<body>
<h1>📊 Python sorted() Analysis</h1>
<div class="card">
<h2>Results</h2>
<div class="metric">
<span class="label">Time Complexity</span>
<span class="value">O(n)</span>
</div>
<div class="metric">
<span class="label">Space Complexity</span>
<span class="value">O(n log n)</span>
</div>
</div>
<div class="card">
<h2>Chart</h2>
<div class="chart-container">
<svg width="350" height="200" style="background:#f8f9fa;border-radius:8px;">
<text x="175" y="20" text-anchor="middle" font-size="12" fill="#333">Time vs Input Size</text>
<line x1="40" y1="20" x2="40" y2="160" stroke="#ccc" stroke-width="1"/>
<line x1="40" y1="160" x2="320" y2="160" stroke="#ccc" stroke-width="1"/>
<polyline points="45.6,156.57028583223152 68.0,148.33035733410185 96.0,136.83665756017393 320.0,20.0" fill="none" stroke="#4285f4" stroke-width="2"/>
<circle cx="45.6" cy="156.57028583223152" r="4" fill="#4285f4"/><circle cx="68.0" cy="148.33035733410185" r="4" fill="#4285f4"/><circle cx="96.0" cy="136.83665756017393" r="4" fill="#4285f4"/><circle cx="320.0" cy="20.0" r="4" fill="#4285f4"/>
<text x="40" y="180" font-size="10" fill="#666">0</text>
<text x="320" y="180" font-size="10" fill="#666">5,000</text>
</svg>
</div>
</div>
<div class="card">
<h2>Measurements</h2>
<table>
<thead>
<tr>
<th>Size</th>
<th>Time (s)</th>
<th>Std Dev</th>
<th>Memory</th>
</tr>
</thead>
<tbody>
<tr>
<td>100</td>
<td>0.000010</td>
<td>±0.000007</td>
<td>1,016</td>
</tr>
<tr>
<td>500</td>
<td>0.000033</td>
<td>±0.000005</td>
<td>4,216</td>
</tr>
<tr>
<td>1,000</td>
<td>0.000066</td>
<td>±0.000003</td>
<td>12,184</td>
</tr>
<tr>
<td>5,000</td>
<td>0.000399</td>
<td>±0.000013</td>
<td>60,056</td>
</tr>
</tbody>
</table>
</div>
<div class="card">
<h2>Complexity Fits</h2>
<table>
<thead>
<tr>
<th>Class</th>
<th>Error</th>
<th>Scale</th>
</tr>
</thead>
<tbody>
<tr class="best">
<td>O(n) ★</td>
<td>0.1673</td>
<td>79.07 ns/elem</td>
</tr>
<tr class="">
<td>O(n log n) </td>
<td>0.2854</td>
<td>6.50 ns/elem</td>
</tr>
<tr class="">
<td>O(n^2) </td>
<td>0.7605</td>
<td>1.60e-11</td>
</tr>
<tr class="">
<td>O(n^3) </td>
<td>0.8487</td>
<td>3.19e-15</td>
</tr>
<tr class="">
<td>O(√n) </td>
<td>2.2904</td>
<td>4.71 µs/elem</td>
</tr>
</tbody>
</table>
</div>
<footer>
Generated by bigocheck • Zero-dependency complexity analysis
</footer>
</body>
</html>