Skip to content

Commit 33beae2

Browse files
committed
docs: add BENCHMARKS.md for performance history
1 parent 3ba7002 commit 33beae2

1 file changed

Lines changed: 83 additions & 0 deletions

File tree

BENCHMARKS.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# TrueEntropy Benchmark History
2+
3+
Performance benchmarks for all entropy harvesters, updated periodically.
4+
5+
## Latest Benchmark
6+
7+
**Date**: 2024-12-27 20:54 (BRT)
8+
**Platform**: Windows 11, Python 3.11.5
9+
**Network**: Home broadband
10+
11+
### Results
12+
13+
| Harvester | Type | Time (ms) | Entropy (bits) | Data (bytes) | Status |
14+
|-----------|------|-----------|----------------|--------------|--------|
15+
| timing | Offline | 2 | 182 | 512 | ✓ OK |
16+
| system | Offline | 312 | 132 | 296 | ✓ OK |
17+
| network | Online | 1,916 | 104 | 128 | ✓ OK |
18+
| external | Online | 1,335 | 236 | 320 | ✓ OK |
19+
| weather | Online | 18,044 | 132 | 296 | ✓ OK |
20+
| radioactive | Online | 1,651 | 0 | 0 | ✗ Rate Limited |
21+
22+
**Total**: 5/6 harvesters successful, ~23s total, 786 bits entropy
23+
24+
### Summary Statistics
25+
26+
- **Offline Sources**: ~314ms average, always available
27+
- **Online Sources**: ~5.7s average (excluding weather outlier)
28+
- **Weather API**: Slow (~18s) but reliable
29+
- **Radioactive**: Often rate-limited without API key
30+
31+
---
32+
33+
## Benchmark History
34+
35+
### 2024-12-27 - Initial Benchmark
36+
37+
First comprehensive benchmark after implementing offline mode feature.
38+
39+
| Metric | Value |
40+
|--------|-------|
41+
| Offline harvesters success rate | 100% |
42+
| Online harvesters success rate | 75% (3/4) |
43+
| Total entropy collected | 786 bits |
44+
| Total collection time | 23.26s |
45+
46+
**Notes**:
47+
- radioactive harvester rate-limited (no API key configured)
48+
- weather harvester unusually slow (18s) - wttr.in latency
49+
- All offline sources performing within expected parameters
50+
51+
---
52+
53+
## How to Run Benchmarks
54+
55+
```bash
56+
# Full benchmark with report
57+
pytest tests/test_harvesters_live.py::TestAllHarvesters::test_all_harvesters_benchmark -v -s
58+
59+
# Offline only (fast)
60+
pytest tests/test_harvesters_live.py::TestOfflineHarvesters -v -s
61+
62+
# Online only
63+
pytest tests/test_harvesters_live.py::TestOnlineHarvesters -v -s
64+
```
65+
66+
## Benchmark Template
67+
68+
Copy this template when adding new benchmark entries:
69+
70+
```markdown
71+
### YYYY-MM-DD - Description
72+
73+
| Harvester | Type | Time (ms) | Entropy (bits) | Status |
74+
|-----------|------|-----------|----------------|--------|
75+
| timing | Offline | X | X | ✓/✗ |
76+
| system | Offline | X | X | ✓/✗ |
77+
| network | Online | X | X | ✓/✗ |
78+
| external | Online | X | X | ✓/✗ |
79+
| weather | Online | X | X | ✓/✗ |
80+
| radioactive | Online | X | X | ✓/✗ |
81+
82+
**Notes**: ...
83+
```

0 commit comments

Comments
 (0)