···
245
+
writer.describe_metrics();
Ok((reader, writer, js_cursor, sketch_secret))
···
"storage_fjall_l0_run_count",
"number of L0 runs in a partition"
398
+
"storage_fjall_keyspace_disk_space",
400
+
"total storage used according to fjall"
403
+
"storage_fjall_journal_count",
405
+
"total keyspace journals according to fjall"
408
+
"storage_fjall_keyspace_sequence",
410
+
"fjall keyspace sequence"
···
.set(self.rollups.tree.l0_run_count() as f64);
gauge!("storage_fjall_l0_run_count", "partition" => "queues")
.set(self.queues.tree.l0_run_count() as f64);
1044
+
gauge!("storage_fjall_keyspace_disk_space").set(self.keyspace.disk_space() as f64);
1045
+
gauge!("storage_fjall_journal_count").set(self.keyspace.journal_count() as f64);
1046
+
gauge!("storage_fjall_keyspace_sequence").set(self.keyspace.instant() as f64);
async fn get_storage_stats(&self) -> StorageResult<serde_json::Value> {
···
1139
+
fn describe_metrics(&self) {
1140
+
describe_histogram!(
1141
+
"storage_insert_batch_db_batch_items",
1143
+
"how many items are in the fjall batch for batched inserts"
1145
+
describe_histogram!(
1146
+
"storage_insert_batch_db_batch_size",
1148
+
"in-memory size of the fjall batch for batched inserts"
1150
+
describe_histogram!(
1151
+
"storage_rollup_counts_db_batch_items",
1153
+
"how many items are in the fjall batch for a timlies rollup"
1155
+
describe_histogram!(
1156
+
"storage_rollup_counts_db_batch_size",
1158
+
"in-memory size of the fjall batch for a timelies rollup"
1160
+
describe_counter!(
1161
+
"storage_delete_account_partial_commits",
1163
+
"fjall checkpoint commits for cleaning up accounts with too many records"
1165
+
describe_counter!(
1166
+
"storage_delete_account_completions",
1168
+
"total count of account deletes handled"
1170
+
describe_counter!(
1171
+
"storage_delete_account_records_deleted",
1173
+
"total records deleted when handling account deletes"
1175
+
describe_histogram!(
1176
+
"storage_trim_dirty_nsids",
1178
+
"number of NSIDs trimmed"
1180
+
describe_histogram!(
1181
+
"storage_trim_duration",
1182
+
Unit::Microseconds,
1183
+
"how long it took to trim the dirty NSIDs"
1185
+
describe_counter!(
1186
+
"storage_trim_removed",
1188
+
"how many records were removed during trim"
fn rollup_delete_account(
···
insert_batch_static_neu::<NewRollupCursorKey>(&mut batch, &self.global, last_cursor)?;
1358
+
histogram!("storage_rollup_counts_db_batch_items").record(batch.len() as f64);
1359
+
histogram!("storage_rollup_counts_db_batch_size")
1360
+
.record(std::mem::size_of_val(&batch) as f64);
Ok((cursors_advanced, dirty_nsids))
···
if self.bg_taken.swap(true, Ordering::SeqCst) {
return Err(StorageError::BackgroundAlreadyStarted);
1297
-
describe_histogram!(
1298
-
"storage_trim_dirty_nsids",
1300
-
"number of NSIDs trimmed"
1302
-
describe_histogram!(
1303
-
"storage_trim_duration",
1304
-
Unit::Microseconds,
1305
-
"how long it took to trim the dirty NSIDs"
1307
-
describe_counter!(
1308
-
"storage_trim_removed",
1310
-
"how many records were removed during trim"
log::info!("reroll: resetting rollup cursor...");
insert_static_neu::<NewRollupCursorKey>(&self.global, Cursor::from_start())?;
···
1465
+
histogram!("storage_insert_batch_db_batch_items").record(batch.len() as f64);
1466
+
histogram!("storage_insert_batch_db_batch_size")
1467
+
.record(std::mem::size_of_val(&batch) as f64);
···
batch.remove(&self.records, key_bytes);
if batch.len() >= MAX_BATCHED_ACCOUNT_DELETE_RECORDS {
1649
+
counter!("storage_delete_account_partial_commits").increment(1);
batch = self.keyspace.batch();
1654
+
counter!("storage_delete_account_completions").increment(1);
1655
+
counter!("storage_delete_account_records_deleted").increment(records_deleted as u64);