Skip to content

Commit 50532ef

Browse files
committed
Remove MetricEvent::SnapshotStarted
1 parent a4ef2b3 commit 50532ef

3 files changed

Lines changed: 1 addition & 36 deletions

File tree

kernel/src/metrics/events.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ impl fmt::Display for MetricId {
3636
/// instance. This allows correlating multiple events from the same operation.
3737
#[derive(Debug, Clone)]
3838
pub enum MetricEvent {
39-
/// A snapshot creation operation has started.
40-
SnapshotStarted {
41-
operation_id: MetricId,
42-
table_path: String,
43-
},
44-
4539
/// Log segment loading completed (listing and organizing log files).
4640
LogSegmentLoaded {
4741
operation_id: MetricId,
@@ -89,14 +83,6 @@ pub enum MetricEvent {
8983
impl fmt::Display for MetricEvent {
9084
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9185
match self {
92-
MetricEvent::SnapshotStarted {
93-
operation_id,
94-
table_path,
95-
} => write!(
96-
f,
97-
"SnapshotStarted(id={}, table={})",
98-
operation_id, table_path
99-
),
10086
MetricEvent::LogSegmentLoaded {
10187
operation_id,
10288
duration,

kernel/src/metrics/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
//! impl MetricsReporter for LoggingReporter {
2121
//! fn report(&self, event: MetricEvent) {
2222
//! match event {
23-
//! MetricEvent::SnapshotStarted { operation_id, table_path } => {
24-
//! println!("Snapshot started: {} for table {}", operation_id, table_path);
25-
//! }
2623
//! MetricEvent::LogSegmentLoaded { operation_id, duration, num_commit_files, .. } => {
27-
//! println!(" Log segment loaded in {:?}: {} commits", duration, num_commit_files);
24+
//! println!("Log segment loaded in {:?}: {} commits", duration, num_commit_files);
2825
//! }
2926
//! MetricEvent::SnapshotCompleted { operation_id, version, total_duration } => {
3027
//! println!("Snapshot completed: v{} in {:?}", version, total_duration);

kernel/src/snapshot/builder.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,6 @@ impl SnapshotBuilder {
8989
let operation_id = MetricId::new();
9090
let reporter = engine.get_metrics_reporter();
9191

92-
let table_path = self
93-
.table_root
94-
.as_ref()
95-
.map(|url| url.to_string())
96-
.or_else(|| {
97-
self.existing_snapshot
98-
.as_ref()
99-
.map(|s| s.table_root().to_string())
100-
})
101-
.unwrap_or_else(|| "unknown".to_string());
102-
103-
reporter.as_ref().inspect(|r| {
104-
r.report(MetricEvent::SnapshotStarted {
105-
operation_id,
106-
table_path,
107-
});
108-
});
109-
11092
if let Some(table_root) = self.table_root {
11193
let start = Instant::now();
11294
let log_segment_result = LogSegment::for_snapshot(

0 commit comments

Comments
 (0)