Skip to content

Commit 4b20b5e

Browse files
authored
drop metrics (#54)
Signed-off-by: Florian Lehner <[email protected]>
1 parent 2ea868b commit 4b20b5e

File tree

9 files changed

+4
-402
lines changed

9 files changed

+4
-402
lines changed

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
# Filter source tree to avoid unnecessary rebuilds.
2929
includedSuffixes = [
3030
".proto"
31-
"metrics.json"
3231
"errors.json"
3332
"icon.png"
3433
"add-data.md"

src/storage/metricspec.rs

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/storage/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ pub struct Db {
3939
pub stack_traces: StackTraces,
4040
pub stack_frames: StackFrames,
4141
pub executables: Executables,
42-
pub metrics: Metrics,
4342

4443
// Custom data storage.
4544
pub symbols: SymDb,
4645
}
4746

4847
impl Db {
4948
/// Number of tables.
50-
pub const NUM_TABLES: usize = 5;
49+
pub const NUM_TABLES: usize = 4;
5150

5251
/// Create or open the database.
5352
fn open() -> anyhow::Result<Arc<Self>> {
@@ -68,7 +67,6 @@ impl Db {
6867
stack_traces: open_or_create(db_dir)?,
6968
stack_frames: open_or_create(db_dir)?,
7069
executables: open_or_create(db_dir)?,
71-
metrics: open_or_create(db_dir)?,
7270
symbols: SymDb::open_at(db_dir.join("symbols"))?,
7371
}))
7472
}
@@ -102,7 +100,6 @@ impl Db {
102100
&self.stack_traces,
103101
&self.stack_frames,
104102
&self.executables,
105-
&self.metrics,
106103
]
107104
}
108105
}
@@ -117,9 +114,6 @@ pub use dbtypes::*;
117114
mod tables;
118115
pub use tables::*;
119116

120-
mod metricspec;
121-
pub use metricspec::*;
122-
123117
mod errorspec;
124118
pub use errorspec::*;
125119

src/storage/table.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ pub trait RawTable {
4646
fn cache(&self) -> &Mutex<LruCache<Vec<u8>, Vec<u8>>>;
4747

4848
/// Clear the entire cache.
49+
/// Helper function for tests only so far.
50+
#[allow(dead_code)]
4951
fn clear_cache(&self) {
5052
let mut cache = self.cache().lock().unwrap();
5153
cache.clear();
@@ -246,6 +248,7 @@ pub enum MergeOperator<T: Table> {
246248
Default,
247249

248250
/// Custom associative merge operator.
251+
#[allow(dead_code)]
249252
Associative(MergeFn<T>),
250253
}
251254

src/storage/tables/metrics.rs

Lines changed: 0 additions & 164 deletions
This file was deleted.

src/storage/tables/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828
//! could come up for devfiler.
2929
3030
mod executables;
31-
mod metrics;
3231
mod stackframes;
3332
mod stacktraces;
3433
mod traceevents;
3534

3635
pub use executables::*;
37-
pub use metrics::*;
3836
pub use stackframes::*;
3937
pub use stacktraces::*;
4038
pub use traceevents::*;

src/ui/app.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ impl DevfilerUi {
6565
Box::new(tabs::ExecutablesTab::default()),
6666
Box::new(tabs::LogTab::default()),
6767
// Keep dev mode tabs below.
68-
Box::new(tabs::MetricsTab::default()),
6968
Box::new(tabs::TraceFreqTab::default()),
7069
Box::new(tabs::DbStatsTab::default()),
7170
Box::new(tabs::GrpcLogTab::default()),

0 commit comments

Comments
 (0)