@@ -122,6 +122,36 @@ local function update()
122
122
' Number of retained `read_view` tuples / number of stories' ,
123
123
memtx_stat .mvcc .tuples .read_view .retained .total , {kind = " total" }, nil , {default = true })
124
124
125
+ -- Tarantool 3.0 memory statistics
126
+
127
+ local ok , memtx_stat_3 = pcall (box .stat .memtx )
128
+ if not ok or memtx_stat_3 .data == nil or memtx_stat_3 .index == nil then
129
+ return
130
+ end
131
+
132
+ collectors_list .memtx_tuples_data_total =
133
+ utils .set_gauge (' memtx_tuples_data_total' ,
134
+ ' Total amount of memory allocated for data tuples' ,
135
+ memtx_stat_3 .data .total , nil , nil , {default = true })
136
+ collectors_list .memtx_tuples_data_read_view =
137
+ utils .set_gauge (' memtx_tuples_data_read_view' ,
138
+ ' Memory held for read views' ,
139
+ memtx_stat_3 .data .read_view , nil , nil , {default = true })
140
+ collectors_list .memtx_tuples_data_garbage =
141
+ utils .set_gauge (' memtx_tuples_data_garbage' ,
142
+ ' Memory that is unused and scheduled to be freed' ,
143
+ memtx_stat_3 .data .garbage , nil , nil , {default = true })
144
+
145
+
146
+ collectors_list .memtx_index_total =
147
+ utils .set_gauge (' memtx_index_total' ,
148
+ ' Total amount of memory allocated for indexing data' ,
149
+ memtx_stat_3 .index .total , nil , nil , {default = true })
150
+ collectors_list .memtx_index_read_view =
151
+ utils .set_gauge (' memtx_index_read_view' ,
152
+ ' Memory held for read views' ,
153
+ memtx_stat_3 .index .read_view , nil , nil , {default = true })
154
+
125
155
end
126
156
127
157
return {
0 commit comments