Skip to content

Commit

Permalink
fix: update torrust tracker config in bencher (#208)
Browse files Browse the repository at this point in the history
Now, some configuration options have default values. So we only need to
disable options that make the tracker slower.

Some options are still mandatory like:

- logging.threshold
- metadata.schema_version
- core.listed
- core.private
  • Loading branch information
josecelano authored Aug 7, 2024
1 parent 62aab2d commit c254605
Showing 1 changed file with 17 additions and 33 deletions.
50 changes: 17 additions & 33 deletions crates/bencher/src/protocols/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,50 +457,34 @@ impl ProcessRunner for TorrustTrackerUdpRunner {
writedoc!(
tmp_file,
r#"
announce_interval = 120
db_driver = "Sqlite3"
db_path = "./sqlite3.db"
external_ip = "0.0.0.0"
inactive_peer_cleanup_interval = 600
log_level = "error"
max_peer_timeout = 900
min_announce_interval = 120
mode = "public"
on_reverse_proxy = false
[metadata]
schema_version = "2.0.0"
[logging]
threshold = "error"
[core]
listed = false
private = false
tracker_usage_statistics = false
[core.database]
driver = "sqlite3"
path = "./sqlite3.db"
[core.tracker_policy]
persistent_torrent_completed_stat = false
remove_peerless_torrents = false
tracker_usage_statistics = false
[[udp_trackers]]
bind_address = "0.0.0.0:3000"
enabled = true
[[http_trackers]]
bind_address = "0.0.0.0:7070"
enabled = false
ssl_cert_path = ""
ssl_enabled = false
ssl_key_path = ""
[http_api]
bind_address = "127.0.0.1:1212"
enabled = false
ssl_cert_path = ""
ssl_enabled = false
ssl_key_path = ""
[http_api.access_tokens]
admin = "MyAccessToken"
[health_check_api]
bind_address = "127.0.0.1:1313"
"#,
)?;

Ok(Command::new("taskset")
.arg("--cpu-list")
.arg(vcpus.as_cpu_list())
.env("TORRUST_TRACKER_PATH_CONFIG", tmp_file.path())
.env("TORRUST_TRACKER_CONFIG_TOML_PATH", tmp_file.path())
.arg(&command.torrust_tracker)
.stdout(Stdio::piped())
.stderr(Stdio::piped())
Expand Down

0 comments on commit c254605

Please sign in to comment.