runtime-node
runtime-node copied to clipboard
Reduce compressed stats per operation from 100 -> 20
We keep durations of invocations to measure how long our algo takes to detect attacks. So per fs.readFile or mysql.query...
When 5000 samples are reached, we compress the durations into percentiles.
100 * 5000 = 5M durations
That's a lot per operation. I think we can reduce this to 100K invocations per operation :)
So that we only keep 20 compressed percentiles per operation.
If we go over this 20, we drop the oldest compressed percentiles.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!