diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2015-06-26 17:02:09 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2015-06-27 16:04:07 +0100 |
commit | 3a5cf84317197cdac88196cda76c6a7e08943f20 (patch) | |
tree | 5a8de68361378d9884ad6d41ac373382dc907324 /lib/igt_stats.h | |
parent | a2f6fd3725f50919c79694f1e24c1dec2752c875 (diff) |
stats: Add a way to specify if the data set is a population or a sample
This changes how we compute the variance. We want an unbiased variance
when reasoning about a sample.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/igt_stats.h')
-rw-r--r-- | lib/igt_stats.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_stats.h b/lib/igt_stats.h index c45c8197..d2c1cc7a 100644 --- a/lib/igt_stats.h +++ b/lib/igt_stats.h @@ -38,12 +38,14 @@ typedef struct { /*< private >*/ unsigned int capacity; + unsigned int is_population : 1; unsigned int mean_variance_valid : 1; double mean, variance; } igt_stats_t; void igt_stats_init(igt_stats_t *stats, unsigned int capacity); void igt_stats_fini(igt_stats_t *stats); +void igt_stats_set_population(igt_stats_t *stats, bool full_population); void igt_stats_push(igt_stats_t *stats, uint64_t value); double igt_stats_get_mean(igt_stats_t *stats); double igt_stats_get_variance(igt_stats_t *stats); |