summaryrefslogtreecommitdiff
path: root/tools/wrk/src/stats.h
blob: 04a9393132234fc821f45aac34ac38b3bdc4c7cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef STATS_H
#define STATS_H

typedef struct {
    uint64_t samples;
    uint64_t index;
    uint64_t limit;
    uint64_t data[];
} stats;

stats *stats_alloc(uint64_t);
void stats_free(stats *);
void stats_record(stats *, uint64_t);
uint64_t stats_min(stats *);
uint64_t stats_max(stats *);
long double stats_mean(stats *);
long double stats_stdev(stats *stats, long double);
long double stats_within_stdev(stats *, long double, long double, uint64_t);

#endif /* STATS_H */