Commit dede63e
committed
fix(common): make defaultMaxBlobSizeStr a string literal so -ldflags -X works
A previous version initialised the variable via strconv.FormatUint(...),
which Go's linker treats as a non-constant expression — so -ldflags -X
silently no-ops the override. Every benchmark that tried to set a
smaller MaxBlobSize at link time was actually running with the 128 MiB
default, masking what we were measuring.
The correct form is a plain string literal in the source. The Fibre
cap is documented in the comment so the magic number stays
self-explanatory; init() still parses and falls back to the literal
value if parsing fails.1 parent e0021d9 commit dede63e
1 file changed
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 5 | | |
13 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | | - | |
16 | | - | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | | - | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
0 commit comments