-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery_results.py
More file actions
32 lines (24 loc) · 802 Bytes
/
Copy pathquery_results.py
File metadata and controls
32 lines (24 loc) · 802 Bytes
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
import sqlite3
def print_results():
conn = sqlite3.connect('benchmarks.db')
cursor = conn.cursor()
print("\nBenchmark Summary:")
print("-" * 80)
cursor.execute("""
SELECT b.name, b.category, r.timestamp, r.execution_time, r.output
FROM benchmarks b
JOIN results r ON b.id = r.benchmark_id
ORDER BY r.timestamp DESC
""")
rows = cursor.fetchall()
for row in rows:
name, category, timestamp, execution_time, output = row
print(f"\nBenchmark: {name}")
print(f"Category: {category}")
print(f"Timestamp: {timestamp}")
print(f"Execution Time: {execution_time:.6f} seconds")
print(f"Output: {output}")
print("-" * 80)
conn.close()
if __name__ == "__main__":
print_results()