All measurements of a frame are saved continuously.
Faster length calculation and index operation on ring buffer.
Added tests for the container.
Benchmark:
start_frame() with drop:
old = 112.10 ns
new = 60.176 ns
start_measurement() with drop:
old = 93.523 ns
new = 96.892 ns
start_frame() is a lot faster, start_measurement() is a little bit slower, but overall the consistent performance should improve, since once all frame slots are filled, we won't hit the allocator anymore. Packets still hit the allocator, because the boxed trait object can't be re-used.
Benchmark:
start_frame() is a lot faster, start_measurement() is a little bit slower, but overall the consistent performance should improve, since once all frame slots are filled, we won't hit the allocator anymore. Packets still hit the allocator, because the boxed trait object can't be re-used.