summaryrefslogtreecommitdiff
path: root/libbcachefs/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/util.h')
-rw-r--r--libbcachefs/util.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libbcachefs/util.h b/libbcachefs/util.h
index a7f68e17..846e6024 100644
--- a/libbcachefs/util.h
+++ b/libbcachefs/util.h
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>
+#include <linux/mean_and_variance.h>
struct closure;
@@ -380,14 +381,18 @@ struct time_stat_buffer {
struct time_stats {
spinlock_t lock;
- u64 count;
/* all fields are in nanoseconds */
- u64 average_duration;
- u64 average_frequency;
u64 max_duration;
+ u64 min_duration;
+ u64 max_freq;
+ u64 min_freq;
u64 last_event;
struct quantiles quantiles;
+ struct mean_and_variance duration_stats;
+ struct mean_and_variance_weighted duration_stats_weighted;
+ struct mean_and_variance freq_stats;
+ struct mean_and_variance_weighted freq_stats_weighted;
struct time_stat_buffer __percpu *buffer;
};