Commit c4715b0
feat(bb): upload benchmark breakdowns to CI disk storage (#17871)
## Summary
Automatically uploads Barretenberg benchmark breakdown JSON files
(hierarchical op counts and timings) to CI disk storage when running
native builds in CI. These breakdowns are accessible via
ci.aztec-labs.com for analysis and performance tracking.
## Changes
- **Enable hierarchical benchmarks**: Always run with
`--bench_out_hierarchical` flag for native builds to capture detailed
performance breakdowns
- **Upload to CI infrastructure**: Write benchmark data to both Redis
and persistent disk storage
- **Accessible via ci.aztec-labs.com**: Breakdowns available at
`http://ci.aztec-labs.com/bench-bb-breakdown-<flow>-<sha>`
- **Explicit subfolder storage**: New `cache_disk_transfer_to()`
function for organized disk storage
## Implementation
Uses the existing CI disk logging infrastructure (from #17970):
- Writes to Redis for immediate access (30-day retention)
- Writes to `/logs-disk/bench/bb-breakdown/` on bastion for long-term
storage
- Automatic fallback to disk when Redis expires (via rkapp)
- Leverages SSH multiplexing for efficient transfers
- Explicit subfolder parameter for organized disk layout
## Storage Structure
**Redis key format (URL-safe):**
```
bench-bb-breakdown-<flow_name>-<commit_sha>
```
**Disk path (organized in subfolder):**
```
/logs-disk/bench/bb-breakdown/<flow_name>-<commit_sha>.log.gz
```
**Example URL:**
```
http://ci.aztec-labs.com/bench-bb-breakdown-ecdsar1+transfer_0_recursions+sponsored_fpc-a39b92d6e9
```
## Benefits
- **Simple**: Clean implementation using existing infrastructure
- **Reliable**: Same proven mechanism as CI logs
- **No race conditions**: Each commit SHA gets unique key
- **Fast**: Direct Redis + SSH pipe operations
- **Organized**: Explicit subfolder separation from numeric/hex log keys
- **URL-safe**: Hyphenated keys work as direct URL paths
- **Consistent**: Same pattern as other CI artifacts
## Requirements
- Requires `CI_ENABLE_DISK_LOGS=1` to be set in CI
- Depends on #17970 for `cache_disk_transfer` infrastructure
- Depends on #17940 for `--bench_out_hierarchical` flag
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <[email protected]>1 parent 657fb63 commit c4715b0
File tree
2 files changed
+56
-6
lines changed- barretenberg/cpp/scripts
- ci3
2 files changed
+56
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
102 | 105 | | |
103 | 106 | | |
104 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
19 | 32 | | |
20 | 33 | | |
21 | 34 | | |
| |||
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
43 | | - | |
| 56 | + | |
0 commit comments