trace-server: pack SelfTimeEntry to 16 bytes
There are approx. 2 self-time entries per span, so this is one of the largest per-span costs. Replacing the second `Timestamp` with a `u32` duration, and using `NonZeroU32` instead of `Option<SpanIndex>` takes the struct down from 24 to 16 bytes, and shrinks the data carried in the tree during ingest. Tested against a real, enormous 9GB trace. Interleaved A/B tests run multiple times, showed the following delta: Peak RSS: 3797 -> 3330 MB (-12.3%) Live heap: 3969 -> 3395 MB tree: 1713 -> 1148 MB ingest 271 -> 276 MB/s (+1.8%)
Showing
Please
register
or
sign in
to comment