@@ -5,6 +5,7 @@ var metrics = m.initializeNoop(Metrics);
5
5
const Metrics = struct {
6
6
searches : m .Counter (u64 ),
7
7
updates : m .Counter (u64 ),
8
+ checkpoints : m .Counter (u64 ),
8
9
memory_segment_merges : m .Counter (u64 ),
9
10
file_segment_merges : m .Counter (u64 ),
10
11
};
@@ -17,6 +18,10 @@ pub fn update(count: usize) void {
17
18
metrics .updates .incrBy (@intCast (count ));
18
19
}
19
20
21
+ pub fn checkpoint () void {
22
+ metrics .checkpoints .incr ();
23
+ }
24
+
20
25
pub fn memorySegmentMerge () void {
21
26
metrics .memory_segment_merges .incr ();
22
27
}
@@ -29,6 +34,7 @@ pub fn initializeMetrics(comptime opts: m.RegistryOpts) !void {
29
34
metrics = .{
30
35
.searches = m .Counter (u64 ).init ("searches_total" , .{}, opts ),
31
36
.updates = m .Counter (u64 ).init ("updates_total" , .{}, opts ),
37
+ .checkpoints = m .Counter (u64 ).init ("checkpoints_total" , .{}, opts ),
32
38
.memory_segment_merges = m .Counter (u64 ).init ("memory_segment_merges_total" , .{}, opts ),
33
39
.file_segment_merges = m .Counter (u64 ).init ("file_segment_merges_total" , .{}, opts ),
34
40
};
0 commit comments