Commit 66e3f31
Add --detailed-read-stats flag
Summary:
The filesystem traversal benchmark needed better diagnostics to identify
performance bottlenecks in Eden and understand file access patterns. Without
detailed breakdowns, it was difficult to determine whether slowness was due
to small file overhead, large file I/O, or specific directory hotspots.
This adds a --detailed-read-stats flag that provides:
- File size distribution across 7 buckets (<1KB to >100MB)
- Small/medium/large file performance breakdown (10KB and 1MB thresholds)
- Per-category metrics showing time spent in open() vs read()
- Top 20 slowest directories with throughput analysis
- Directory depth distribution relative to traversal base paths
Key design decisions:
- Enum-indexed arrays for file categories ensure type safety
- Paths displayed relative to --dir arguments for cleaner output
- Lock-free atomics for thread-safe concurrent statistics updates
- Memory overhead: ~8 KB for histograms + unbounded HashMap for per-directory stats
Reviewed By: muirdm
Differential Revision: D84996648
fbshipit-source-id: ced2b9e151002719a5c3b20b1d104ccf335d788f1 parent ff1dfff commit 66e3f31
2 files changed
Lines changed: 468 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| 207 | + | |
199 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
200 | 219 | | |
201 | 220 | | |
202 | 221 | | |
| |||
223 | 242 | | |
224 | 243 | | |
225 | 244 | | |
| 245 | + | |
226 | 246 | | |
227 | 247 | | |
228 | 248 | | |
| |||
0 commit comments