runtime-node icon indicating copy to clipboard operation
runtime-node copied to clipboard

Reduce compressed stats per operation from 100 -> 20

Open hansott opened this issue 7 months ago • 1 comments

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.

hansott avatar May 16 '25 11:05 hansott

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar May 16 '25 11:05 codecov[bot]