Skip to content

Commit

Permalink
Fix double/missing description on some metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
gruuya committed Jun 21, 2024
1 parent 1e782ef commit 380c79f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/frontend/flight/sync/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const REQUEST_ROWS: &str = "seafowl_changeset_writer_request_rows_total";
const IN_MEMORY_BYTES: &str = "seafowl_changeset_writer_in_memory_bytes_current";
const IN_MEMORY_ROWS: &str = "seafowl_changeset_writer_in_memory_rows_current";
const IN_MEMORY_OLDEST: &str =
"seafowl_changeset_writer_in_memory_oldest_timestamp_seconds_current";
"seafowl_changeset_writer_in_memory_oldest_timestamp_seconds";
const COMPACTION_TIME: &str = "seafowl_changeset_writer_compaction_time_seconds";
const COMPACTED_BYTES: &str = "seafowl_changeset_writer_compacted_bytes_total";
const COMPACTED_ROWS: &str = "seafowl_changeset_writer_compacted_rows_total";
Expand Down Expand Up @@ -52,15 +52,15 @@ impl SyncMetrics {
"The total byte size of all batches in the sync message"
);
describe_counter!(
REQUEST_BYTES,
REQUEST_ROWS,
"The total row count of of all batches in the sync message"
);
describe_gauge!(
IN_MEMORY_BYTES,
"The total byte size of all pending batches in memory"
);
describe_gauge!(
IN_MEMORY_BYTES,
IN_MEMORY_ROWS,
"The total row count of all pending batches in memory"
);
describe_gauge!(
Expand All @@ -76,7 +76,7 @@ impl SyncMetrics {
"The reduction in byte size due to batch compaction"
);
describe_counter!(
COMPACTED_BYTES,
COMPACTED_ROWS,
"The reduction in row count due to batch compaction"
);
describe_histogram!(FLUSH_TIME, "The time taken to flush a collections of syncs");
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/flight/sync/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl SeafowlDataSyncWriter {
self.metrics.request_rows.increment(old_rows as u64);
let start = Instant::now();
let batch = compact_batches(&sync_schema, batches)?;
let duration = start.elapsed().as_millis();
let duration = start.elapsed().as_secs();

// Get new size and row count
let size = batch.get_array_memory_size();
Expand Down

0 comments on commit 380c79f

Please sign in to comment.