Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): count the appearances of opcode and opcode sets #5211

Closed
wants to merge 14 commits into from
6 changes: 5 additions & 1 deletion bin/reth/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
args::utils::genesis_value_parser,
chain,
cli::ext::RethCliExt,
db, debug_cmd,
count_opcodes, db, debug_cmd,
dirs::{LogsDir, PlatformPath},
node, p2p, recover,
runner::CliRunner,
Expand Down Expand Up @@ -95,6 +95,7 @@ impl<Ext: RethCliExt> Cli<Ext> {
Commands::Config(command) => runner.run_until_ctrl_c(command.execute()),
Commands::Debug(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)),
Commands::Recover(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)),
Commands::CountOpcodes(command) => runner.run_until_ctrl_c(command.execute()),
}
}

Expand Down Expand Up @@ -163,6 +164,9 @@ pub enum Commands<Ext: RethCliExt = ()> {
/// Scripts for node recovery
#[command(name = "recover")]
Recover(recover::Command),
/// Script for counting opcodes occurrencies
#[command(name = "count-opcodes")]
CountOpcodes(count_opcodes::Command),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put this under debug or something like that since it's not really relevant to normal node ops

}

impl<Ext: RethCliExt> Commands<Ext> {
Expand Down
Loading
Loading