Skip to content

Commit

Permalink
ledger-tool: Disable os memory reporting on verify command by default (
Browse files Browse the repository at this point in the history
…solana-labs#34469)

Negate the name of the arg and change the meaning such that it is now
set-to-enable instead of set-to-disable
  • Loading branch information
steviez authored Dec 15, 2023
1 parent a58e462 commit eaec422
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,9 @@ fn main() {
.validator(is_slot)
.takes_value(true)
.help("Halt processing at the given slot");
let no_os_memory_stats_reporting_arg = Arg::with_name("no_os_memory_stats_reporting")
.long("no-os-memory-stats-reporting")
.help("Disable reporting of OS memory statistics.");
let os_memory_stats_reporting_arg = Arg::with_name("os_memory_stats_reporting")
.long("os-memory-stats-reporting")
.help("Enable reporting of OS memory statistics.");
let accounts_db_skip_initial_hash_calc_arg =
Arg::with_name("accounts_db_skip_initial_hash_calculation")
.long("accounts-db-skip-initial-hash-calculation")
Expand Down Expand Up @@ -1634,7 +1634,7 @@ fn main() {
.arg(&halt_at_slot_store_hash_raw_data)
.arg(&hard_forks_arg)
.arg(&accounts_db_test_hash_calculation_arg)
.arg(&no_os_memory_stats_reporting_arg)
.arg(&os_memory_stats_reporting_arg)
.arg(&allow_dead_slots_arg)
.arg(&max_genesis_archive_unpacked_size_arg)
.arg(&debug_key_arg)
Expand Down Expand Up @@ -2684,12 +2684,11 @@ fn main() {
}
("verify", Some(arg_matches)) => {
let exit_signal = Arc::new(AtomicBool::new(false));
let no_os_memory_stats_reporting =
arg_matches.is_present("no_os_memory_stats_reporting");
let report_os_memory_stats = arg_matches.is_present("os_memory_stats_reporting");
let system_monitor_service = SystemMonitorService::new(
Arc::clone(&exit_signal),
SystemMonitorStatsReportConfig {
report_os_memory_stats: !no_os_memory_stats_reporting,
report_os_memory_stats,
report_os_network_stats: false,
report_os_cpu_stats: false,
report_os_disk_stats: false,
Expand Down

0 comments on commit eaec422

Please sign in to comment.