Commit 06bf746
authored
Add trace timer (#261)
This PR adds a `StartTimer` utility that we can use to show how much
time different internal stages of the system are taking if the
playground runs in `--log-level=trace` mode.
Example of the output:
```$ go run main.go cook l1 --output ./output --log-level trace
2025/12/17 09:08:57 Log level: trace
2025/12/17 09:08:57 deleting existing output directory ./output
2025/12/17 09:08:57 Genesis block hash: 0xf755a8f8203a2a94c3b9c028898f0c218c220bbc4a99648274726912da70e2ee
2025/12/17 09:09:00 [TRACE] artifacts.builder: 3.435216667s
2025/12/17 09:09:00 [TRACE] docker.pull-available-images: 23.35025ms
2025/12/17 09:09:18 [TRACE] docker.up: 18.081256709s
```
Note that in this case, `docker.up` contains the time for
`mev-boost-relay` to be ready and healthy which needs beacon to be
running.1 parent a42a462 commit 06bf746
File tree
4 files changed
+34
-0
lines changed- playground
- utils
4 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
884 | 885 | | |
885 | 886 | | |
886 | 887 | | |
| 888 | + | |
| 889 | + | |
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
| |||
921 | 924 | | |
922 | 925 | | |
923 | 926 | | |
| 927 | + | |
| 928 | + | |
924 | 929 | | |
925 | 930 | | |
926 | 931 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments