Skip to content

Commit

Permalink
Break down file storage usage gauge by component (#30077)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 077fab0b09ee47d5681ff043846a8a7a2931f78f
  • Loading branch information
emmaling27 authored and Convex, Inc. committed Sep 24, 2024
1 parent fc68aa9 commit 7985643
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/events/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ impl UsageCounterState {
},
UsageEvent::CurrentVectorStorage { tables: _ } => todo!(),
UsageEvent::CurrentDatabaseStorage { tables: _ } => todo!(),
UsageEvent::CurrentFileStorage { total_size: _ } => todo!(),
UsageEvent::CurrentFileStorage {
total_size: _,
by_component: _,
} => todo!(),
UsageEvent::CurrentDocumentCounts { tables: _ } => todo!(),
}
}
Expand Down
5 changes: 5 additions & 0 deletions crates/events/src/usage.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::collections::BTreeMap;

use async_trait::async_trait;
use serde::{
Deserialize,
Expand Down Expand Up @@ -108,7 +110,10 @@ pub enum UsageEvent {
tables: Vec<TableDatabaseStorage>,
},
CurrentFileStorage {
// TODO(ENG-7423): Clean up this old field once no databricks tables and queries rely on
// it. They should use the by_component field instead.
total_size: u64,
by_component: BTreeMap<Option<String>, u64>,
},
CurrentDocumentCounts {
tables: Vec<TableDocumentCount>,
Expand Down

0 comments on commit 7985643

Please sign in to comment.