benchee icon indicating copy to clipboard operation
benchee copied to clipboard

Built in outlier detection

Open PragTob opened this issue 2 years ago • 2 comments

Due to Garbage Collection, scheduling and load on the system we can get outliers in our measurements that impact esp. the average a lot. That happens esp. a lot with nano-second level benchmarks as even a 1ms gap is huge for them.

I'm no expert not 100% sure what to use, but I already wanted to support more data calculated by benchee itself for box plots (so to run less JS which makes this not be able to be opened). I talk about it here (I had forgotten): https://www.youtube.com/watch?v=C4hqcLwxs3A&t=1398s

But basically, as far as I understand p75 - p25 is the inter quantile range (IQR) and everything that is more than 1.5 IQR removed from p75 or p25 are considered outliers. Skimming over wikipedia, that description seems accurate: https://en.wikipedia.org/wiki/Box_plot (Elements --> Whiskers)

We could run this statistical analysis once, remove the offending values and then rerun statistics calculation.

I think this should be opt in behavior (so default to false).

Kudos to the elixirforum post to remind me that we didn't yet have an issue for this.

PragTob avatar Jun 25 '23 10:06 PragTob

Just want to chime in to thank you for Benchee and let anyone else who might come across this know that bencheeorg/statistex#5 got extended and merged via bencheeorg/statistex#10 🐇

ivanov avatar May 08 '25 01:05 ivanov

@ivanov good call out, thank you!

I'm planning to update it here and implement an option for benchee to use it this extended weekend :)

PragTob avatar May 08 '25 08:05 PragTob

ahaha what was I thinking about that extended weekend 😂

PragTob avatar Jul 06 '25 13:07 PragTob

And this is finally releasing.. in a couple of minutes if no disaster strikes. Thanks @NickNeck !

Image

PragTob avatar Oct 21 '25 20:10 PragTob