paulirish / pwmetrics

Progressive web metrics at your fingertipz
Apache License 2.0
1.25k stars 74 forks source link

Feature Request: Support alternative median metric or logic #218

Closed brophdawg11 closed 2 years ago

brophdawg11 commented 5 years ago

Would this package be open to alternative calculations of the "median" run? Currently, it chooses the run with the median TTFCPUIDLE value, but that may not necessarily be the median SI or TTI value either. Depending on which value the consumer is most concerned with testing, I could see misleading results by always basing the median run off TTFCPUIDLE.

I'm wondering if it would be helpful to provide config flags to specify which nmetric to calculate the median run using.

I'm also tossing around whether I think it would be useful to report the average for each metric independently or not.

Thanks!

brophdawg11 commented 5 years ago

I took a stab at implementing this in https://github.com/paulirish/pwmetrics/pull/219. Haven't looked into unit tests yet but will if this is an acceptable approach