diff options
Diffstat (limited to 'tools/perf/util/stat.h')
| -rw-r--r-- | tools/perf/util/stat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h new file mode 100644 index 000000000000..588367c3c767 --- /dev/null +++ b/tools/perf/util/stat.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef __PERF_STATS_H | ||
| 2 | #define __PERF_STATS_H | ||
| 3 | |||
| 4 | #include "types.h" | ||
| 5 | |||
| 6 | struct stats | ||
| 7 | { | ||
| 8 | double n, mean, M2; | ||
| 9 | }; | ||
| 10 | |||
| 11 | void update_stats(struct stats *stats, u64 val); | ||
| 12 | double avg_stats(struct stats *stats); | ||
| 13 | double stddev_stats(struct stats *stats); | ||
| 14 | double rel_stddev_stats(double stddev, double avg); | ||
| 15 | |||
| 16 | #endif | ||
