Skip to content

Commit

Permalink
ledger-tool: name rayon threads (#464)
Browse files Browse the repository at this point in the history
ledger-tool: name and shame rayon threads
  • Loading branch information
alessandrod authored Mar 28, 2024
1 parent 8822aaa commit f36a45a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions ledger-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ histogram = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
num_cpus = { workspace = true }
rayon = { workspace = true }
regex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
Expand Down
6 changes: 6 additions & 0 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,12 @@ fn main() {

let verbose_level = matches.occurrences_of("verbose");

// Name the rayon global thread pool
rayon::ThreadPoolBuilder::new()
.thread_name(|i| format!("solRayonGlob{i:02}"))
.build_global()
.unwrap();

match matches.subcommand() {
("bigtable", Some(arg_matches)) => bigtable_process_command(&ledger_path, arg_matches),
("blockstore", Some(arg_matches)) => blockstore_process_command(&ledger_path, arg_matches),
Expand Down

0 comments on commit f36a45a

Please sign in to comment.