1//! # reth-benchmark
2//!
3//! This is a tool that converts existing blocks into a stream of blocks for benchmarking purposes.
4//! These blocks are then fed into reth as a stream of execution payloads.
56#![doc(
7 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
8 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
9 issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
10)]
11#![cfg_attr(not(test), warn(unused_crate_dependencies))]
12#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
1314#[global_allocator]
15static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();
1617pub mod authenticated_transport;
18pub mod bench;
19pub mod bench_mode;
20pub mod valid_payload;
2122use bench::BenchmarkCommand;
23use clap::Parser;
24use reth_cli_runner::CliRunner;
2526fn main() {
27// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
28if std::env::var_os("RUST_BACKTRACE").is_none() {
29std::env::set_var("RUST_BACKTRACE", "1");
30 }
3132// Run until either exit or sigint or sigterm
33let runner = CliRunner::try_default_runtime().unwrap();
34runner35 .run_command_until_exit(|ctx| {
36let command = BenchmarkCommand::parse();
37command.execute(ctx)
38 })
39 .unwrap();
40}