aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/stat.h
blob: 588367c3c767f2fd6ff7f3f317986756174a2b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef __PERF_STATS_H
#define __PERF_STATS_H

#include "types.h"

struct stats
{
	double n, mean, M2;
};

void update_stats(struct stats *stats, u64 val);
double avg_stats(struct stats *stats);
double stddev_stats(struct stats *stats);
double rel_stddev_stats(double stddev, double avg);

#endif