summaryrefslogtreecommitdiff
path: root/tools/wrk/src/stats.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wrk/src/stats.h')
-rw-r--r--tools/wrk/src/stats.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/wrk/src/stats.h b/tools/wrk/src/stats.h
new file mode 100644
index 0000000000..04a9393132
--- /dev/null
+++ b/tools/wrk/src/stats.h
@@ -0,0 +1,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 */
+