-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregenerate_graphs.py
More file actions
33 lines (30 loc) · 1.33 KB
/
regenerate_graphs.py
File metadata and controls
33 lines (30 loc) · 1.33 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
#!/usr/bin/env python3
"""Regenerate graphs from existing benchmark results."""
from pathlib import Path
from bench import BenchResult, generate_all_graphs
# Results from the last benchmark run
results = [
# /json-1k
BenchResult("django-bolt", "/json-1k", 39157, 0.00, 0.00, 0, 10),
BenchResult("litestar", "/json-1k", 35398, 0.00, 0.00, 0, 10),
BenchResult("fastapi", "/json-1k", 13726, 0.01, 0.00, 0, 10),
BenchResult("django-ninja", "/json-1k", 3037, 0.03, 0.00, 0, 10),
BenchResult("django-drf", "/json-1k", 1951, 0.05, 0.00, 0, 10),
# /json-10k
BenchResult("django-bolt", "/json-10k", 29857, 0.00, 0.00, 0, 10),
BenchResult("litestar", "/json-10k", 27820, 0.00, 0.00, 0, 10),
BenchResult("django-ninja", "/json-10k", 2652, 0.04, 0.00, 0, 10),
BenchResult("fastapi", "/json-10k", 2565, 0.04, 0.00, 0, 10),
BenchResult("django-drf", "/json-10k", 1702, 0.06, 0.00, 0, 10),
# /db
BenchResult("django-bolt", "/db", 5263, 0.02, 0.00, 0, 10),
BenchResult("django-drf", "/db", 1489, 0.07, 0.00, 0, 10),
BenchResult("fastapi", "/db", 1465, 0.07, 0.00, 0, 10),
BenchResult("litestar", "/db", 1456, 0.07, 0.00, 0, 10),
BenchResult("django-ninja", "/db", 982, 0.10, 0.00, 0, 10),
]
if __name__ == "__main__":
print("Regenerating graphs...")
graph_dir = Path("graphs")
generate_all_graphs(results, graph_dir)
print("Done! Graphs saved to graphs/")