Files
nym/nym-node/src/cli/commands/node_details.rs
T
Jędrzej Stuczyński d062524d32 mix throughput tester (#5661)
* wip: sending with single client

* tag packets to measure latency

* constantly logging rates

* concurrency

* adjusting some values

* write results to files upon completion
2025-03-31 15:57:24 +01:00

29 lines
850 B
Rust

// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: GPL-3.0-only
use crate::cli::helpers::ConfigArgs;
use crate::config::upgrade_helpers::try_load_current_config;
use crate::node::NymNode;
use nym_bin_common::output_format::OutputFormat;
#[derive(Debug, clap::Args)]
pub(crate) struct Args {
#[clap(flatten)]
pub(crate) config: ConfigArgs,
/// Specify the output format of the node details (`text` or `json`)
#[clap(
short,
long,
default_value_t = OutputFormat::default(),
)]
pub(crate) output: OutputFormat,
}
pub async fn execute(args: Args) -> anyhow::Result<()> {
let config = try_load_current_config(args.config.config_path()).await?;
let details = NymNode::new(config).await?.display_details()?;
args.output.to_stdout(&details);
Ok(())
}