Files
CLIProxyAPI/internal/api
JohnsonRan 12f2cafe33 test(api): measure open-stream heap with empty encoder pools
BenchmarkResponseCompressionOpenStreams took its baseline after one GC,
which only moves pooled encoders to the sync.Pool victim cache. Streams
then reused memory the baseline already counted, so heap per open stream
collapsed toward zero once b.N > 1. Run two GC cycles before the baseline
so every sample starts with empty pools.

TestResponseCompressionReusesPooledEncoders now counts encoder creations
and fails when finished encoders are not returned to the pool. It also
interleaves responses whose client writes fail, so an encoder pooled
after an error must still produce correct output.
2026-10-28 04:08:45 +09:00
..