소스 검색

thread names

Lennart Braun 1 년 전
부모
커밋
004e906523
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      oram/examples/bench_doram.rs

+ 6 - 0
oram/examples/bench_doram.rs

@@ -209,6 +209,7 @@ fn main() {
     doram.init(&mut comm, &db_share).expect("init failed");
 
     let thread_pool_prep = rayon::ThreadPoolBuilder::new()
+        .thread_name(|i| format!("thread-prep-{i}"))
         .num_threads(threads_prep)
         .build()
         .unwrap();
@@ -231,10 +232,13 @@ fn main() {
         Default::default()
     };
 
+    drop(thread_pool_prep);
+
     let comm_stats_preprocess = comm.get_stats();
     comm.reset_stats();
 
     let thread_pool_online = rayon::ThreadPoolBuilder::new()
+        .thread_name(|i| format!("thread-online-{i}"))
         .num_threads(threads_online)
         .build()
         .unwrap();
@@ -254,6 +258,8 @@ fn main() {
 
     let comm_stats_access = comm.get_stats();
 
+    drop(thread_pool_online);
+
     comm.shutdown();
 
     let results =