Specify if archive size datapoint is for full or incremental snapshots (#23941) (#23956)

(cherry picked from commit 31b707b6258a5266a40a986e05244e7bef5c170a)

Co-authored-by: Brooks Prumo <brooks@solana.com>
This commit is contained in:
mergify[bot] 2022-03-26 19:08:21 +00:00 committed by GitHub
parent aa26edb7fe
commit a812f4410e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,11 +390,20 @@ pub fn archive_snapshot_package(
timer.as_ms(),
metadata.len()
);
datapoint_info!(
"snapshot-package",
"archive-snapshot-package",
("slot", snapshot_package.slot(), i64),
("duration_ms", timer.as_ms(), i64),
("size", metadata.len(), i64)
(
if snapshot_package.snapshot_type.is_full_snapshot() {
"full-snapshot-archive-size"
} else {
"incremental-snapshot-archive-size"
},
metadata.len(),
i64
),
);
Ok(())
}