Skip to content

Commit

Permalink
Merge pull request apache#1622 from jiacai2050/impl-metric
Browse files Browse the repository at this point in the history
  • Loading branch information
zealchen authored Jan 15, 2025
2 parents 941ea07 + 86e7619 commit 1368157
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ members = [

[workspace.dependencies]
anyhow = { version = "1.0" }
seahash = { version = "4" }
metric_engine = { path = "src/metric_engine" }
horaedb_storage = { package = "storage", path = "src/storage" }
common = { path = "src/common" }
Expand Down
1 change: 1 addition & 0 deletions src/metric_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ description.workspace = true
anyhow = { workspace = true }
common = { workspace = true }
horaedb_storage = { workspace = true }
seahash = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
Expand Down
6 changes: 6 additions & 0 deletions src/metric_engine/src/metric/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ impl MetricManager {
struct Inner {
storage: TimeMergeStorageRef,
}

impl Inner {
async fn populate_metric_ids(&self, _samples: &mut [Sample]) -> Result<()> {
todo!()
}
}
4 changes: 4 additions & 0 deletions src/metric_engine/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ pub struct Sample {
/// hash of labels(sorted)
pub series_id: Option<SeriesId>,
}

pub fn hash(buf: &[u8]) -> u64 {
seahash::hash(buf)
}

0 comments on commit 1368157

Please sign in to comment.