Skip to content

Commit

Permalink
Remove solana-sdk from solana-metrics (#3374)
Browse files Browse the repository at this point in the history
* remove solana-sdk from solana-metrics

* activate features that got deactivate by removing solana-sdk

* add back solana-clock dependency
  • Loading branch information
kevinheavey authored Nov 14, 2024
1 parent 2cb11a7 commit fd38a30
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock

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

5 changes: 4 additions & 1 deletion metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ gethostname = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
reqwest = { workspace = true, features = ["blocking", "brotli", "deflate", "gzip", "rustls-tls", "json"] }
solana-sdk = { workspace = true }
solana-clock = { workspace = true }
solana-cluster-type = { workspace = true }
solana-sha256-hasher = { workspace = true }
solana-time-utils = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions metrics/src/counter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use {
crate::metrics::submit_counter,
log::*,
solana_sdk::timing,
std::{
env,
sync::atomic::{AtomicU64, AtomicUsize, Ordering},
Expand Down Expand Up @@ -174,7 +173,7 @@ impl Counter {
.compare_and_swap(0, Self::default_metrics_rate(), Ordering::Relaxed);
}
pub fn inc(&mut self, level: log::Level, events: usize) {
let now = timing::timestamp();
let now = solana_time_utils::timestamp();
let counts = self.counts.fetch_add(events, Ordering::Relaxed);
let times = self.times.fetch_add(1, Ordering::Relaxed);
let lograte = self.lograte.load(Ordering::Relaxed);
Expand Down
3 changes: 2 additions & 1 deletion metrics/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use {
gethostname::gethostname,
lazy_static::lazy_static,
log::*,
solana_sdk::{genesis_config::ClusterType, hash::hash},
solana_cluster_type::ClusterType,
solana_sha256_hasher::hash,
std::{
cmp,
collections::HashMap,
Expand Down
2 changes: 1 addition & 1 deletion metrics/src/poh_timing_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use {
crossbeam_channel::{Receiver, Sender},
log::*,
solana_sdk::clock::Slot,
solana_clock::Slot,
std::fmt,
};

Expand Down
4 changes: 2 additions & 2 deletions perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ solana-frozen-abi-macro = { workspace = true, optional = true, features = [
] }
solana-hash = { workspace = true }
solana-metrics = { workspace = true }
solana-packet = { workspace = true }
solana-packet = { workspace = true, features = ["bincode"] }
solana-program = { workspace = true, default-features = false }
solana-pubkey = { workspace = true, default-features = false }
solana-rayon-threadlimit = { workspace = true }
solana-sdk = { workspace = true, optional = true }
solana-short-vec = { workspace = true }
solana-signature = { workspace = true }
solana-signature = { workspace = true, features = ["verify"] }
solana-time-utils = { workspace = true }
solana-vote-program = { workspace = true, optional = true }

Expand Down
5 changes: 4 additions & 1 deletion programs/sbf/Cargo.lock

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

0 comments on commit fd38a30

Please sign in to comment.