Skip to content

Commit

Permalink
feat(derive): Remove metrics (#743)
Browse files Browse the repository at this point in the history
* feat(derive): remove metrics

* not(test)
  • Loading branch information
refcell authored Oct 29, 2024
1 parent ba454b5 commit 155eea7
Show file tree
Hide file tree
Showing 21 changed files with 56 additions and 299 deletions.
58 changes: 28 additions & 30 deletions Cargo.lock

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

8 changes: 0 additions & 8 deletions crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ derive_more = { workspace = true, features = ["full"] }
# `serde` feature dependencies
serde = { workspace = true, optional = true, features = ["derive"] }

# `metrics` feature dependencies
lazy_static = { workspace = true, optional = true }
prometheus = { workspace = true, optional = true, features = ["process"] }

# `test-utils` feature dependencies
spin = { workspace = true, optional = true }
anyhow = { workspace = true, optional = true }
Expand All @@ -63,10 +59,6 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitr

[features]
default = ["serde"]
metrics = [
"dep:prometheus",
"dep:lazy_static",
]
serde = [
"dep:serde",
"alloy-primitives/serde",
Expand Down
1 change: 1 addition & 0 deletions crates/derive/src/batch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ impl Batch {
#[cfg(test)]
mod tests {
use super::*;
use alloc::vec;

#[test]
fn test_timestamp() {
Expand Down
1 change: 1 addition & 0 deletions crates/derive/src/batch/span_batch/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ impl SpanBatchTransactions {
#[cfg(test)]
mod tests {
use super::*;
use alloc::vec;
use alloy_consensus::{Signed, TxEip1559, TxEip2930, TxLegacy};
use alloy_primitives::{address, Signature, TxKind};

Expand Down
7 changes: 1 addition & 6 deletions crates/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
html_favicon_url = "https://raw.githubusercontent.com/anton-rs/kona/main/assets/favicon.ico"
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(any(test, feature = "metrics")), no_std)]
#![cfg_attr(not(any(test, feature = "test-utils")), warn(unused_crate_dependencies))]
#![cfg_attr(not(test), no_std)]

extern crate alloc;

Expand All @@ -28,10 +28,5 @@ pub mod sources;
pub mod stages;
pub mod traits;

mod macros;

#[cfg(feature = "metrics")]
pub mod metrics;

#[cfg(any(test, feature = "test-utils"))]
pub mod test_utils;
61 changes: 0 additions & 61 deletions crates/derive/src/macros.rs

This file was deleted.

88 changes: 0 additions & 88 deletions crates/derive/src/metrics.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/derive/src/pipeline/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ mod tests {
test_utils::{TestL2ChainProvider, *},
traits::{ActivationSignal, Pipeline, ResetSignal, Signal, SignalReceiver},
};
use alloc::sync::Arc;
use alloc::{string::ToString, sync::Arc};
use alloy_rpc_types_engine::PayloadAttributes;
use op_alloy_genesis::{RollupConfig, SystemConfig};
use op_alloy_protocol::L2BlockInfo;
Expand Down
Loading

0 comments on commit 155eea7

Please sign in to comment.