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: add env vars to NNM #5163

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions nym-network-monitor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nym-network-monitor"
version = "1.0.1"
version = "1.0.2"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
Expand All @@ -13,7 +13,7 @@ license.workspace = true
[dependencies]
anyhow = { workspace = true }
axum = { workspace = true, features = ["json"] }
clap = { workspace = true, features = ["derive"] }
clap = { workspace = true, features = ["derive", "env"] }
dashmap = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion nym-network-monitor/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ nnm_pid=$!

sleep 10

python -m locust -H http://127.0.0.1:8080 --processes "${processes}" --autostart --autoquit 60 -u "${users}" -t "${timeout}"s &
python -m locust -H http://${NYM_NETWORK_MONITOR_HOST}:${NYM_NETWORK_MONITOR_PORT} --processes "${processes}" --autostart --autoquit 60 -u "${users}" -t "${timeout}"s &
locust_pid=$!

wait $locust_pid
Expand Down
4 changes: 2 additions & 2 deletions nym-network-monitor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ struct Args {
client_lifetime: u64,

/// Port to listen on
#[arg(long, default_value_t = 8080)]
#[arg(long, default_value_t = 8080, env = "NYM_NETWORK_MONITOR_PORT")]
port: u16,

/// Host to listen on
#[arg(long, default_value = "127.0.0.1")]
#[arg(long, default_value = "127.0.0.1", env = "NYM_NETWORK_MONITOR_HOST")]
host: String,

/// Path to the topology file
Expand Down
Loading