blob: 588367c3c767f2fd6ff7f3f317986756174a2b3c [file] [log] [blame]
Xiao Guangrong0007ece2012-09-17 16:31:14 +08001#ifndef __PERF_STATS_H
2#define __PERF_STATS_H
3
4#include "types.h"
5
6struct stats
7{
8 double n, mean, M2;
9};
10
11void update_stats(struct stats *stats, u64 val);
12double avg_stats(struct stats *stats);
13double stddev_stats(struct stats *stats);
14double rel_stddev_stats(double stddev, double avg);
15
16#endif