Skip to content

Commit

Permalink
chore: remove tools/mock-node/benches (#8804)
Browse files Browse the repository at this point in the history
This was added in #6778, but it's honestly really not needed. There's been some discussion that it's easier to just run mock-node directly, and that the benchmarks don't add a ton of value. Also it's not great to have added binary files to the tree.
  • Loading branch information
marcelo-gonzalez authored Mar 27, 2023
1 parent 710780e commit f665aa7
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 243 deletions.
36 changes: 0 additions & 36 deletions Cargo.lock

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

10 changes: 0 additions & 10 deletions tools/mock-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ edition.workspace = true

[dependencies]
actix-rt.workspace = true
actix-web.workspace = true
actix.workspace = true
anyhow.workspace = true
clap.workspace = true
flate2.workspace = true
futures.workspace = true
rand.workspace = true
rayon.workspace = true
serde.workspace = true
serde_json.workspace = true
tar.workspace = true
tempfile.workspace = true
tokio.workspace = true
tracing.workspace = true
Expand All @@ -39,13 +36,6 @@ near-performance-metrics = { path = "../../utils/near-performance-metrics" }
near-primitives = { path = "../../core/primitives" }
nearcore = { path = "../../nearcore" }

[dev-dependencies]
criterion.workspace = true

[[bench]]
name = "sync"
harness = false

[[bin]]
name = "mock-node"
# To make mock node work, we must disable some checks in chain, which is controlled by this feature.
Expand Down
37 changes: 0 additions & 37 deletions tools/mock-node/benches/README.md

This file was deleted.

Binary file removed tools/mock-node/benches/empty.tar.gz
Binary file not shown.
Binary file removed tools/mock-node/benches/full.tar.gz
Binary file not shown.
147 changes: 0 additions & 147 deletions tools/mock-node/benches/sync.rs

This file was deleted.

14 changes: 1 addition & 13 deletions tools/mock-node/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ pub struct MockNode {
pub client: Addr<ClientActor>,
// view client under test
pub view_client: Addr<ViewClientActor>,
// RPC servers started by the client
pub servers: Option<Vec<(&'static str, actix_web::dev::ServerHandle)>>,
// target height actually available to sync to in the chain history database
pub target_height: BlockHeight,
}
Expand Down Expand Up @@ -307,17 +305,7 @@ pub fn setup_mock_node(
});
network_adapter.bind(mock_network_actor.with_auto_span_context());

let servers = config.rpc_config.map(|rpc_config| {
near_jsonrpc::start_http(
rpc_config,
config.genesis.config,
client.clone(),
view_client.clone(),
None,
)
});

MockNode { client, view_client, servers, target_height }
MockNode { client, view_client, target_height }
}

#[cfg(test)]
Expand Down

0 comments on commit f665aa7

Please sign in to comment.