stat.h 297 B

12345678910111213141516
  1. #ifndef __PERF_STATS_H
  2. #define __PERF_STATS_H
  3. #include "types.h"
  4. struct stats
  5. {
  6. double n, mean, M2;
  7. };
  8. void update_stats(struct stats *stats, u64 val);
  9. double avg_stats(struct stats *stats);
  10. double stddev_stats(struct stats *stats);
  11. double rel_stddev_stats(double stddev, double avg);
  12. #endif