@@ -877,6 +877,7 @@ mod tests {
877877 worker_id : WorkerId :: from ( 7usize ) ,
878878 local_queue : 3 ,
879879 cpu_time_ns : 11 ,
880+ tid : 0 ,
880881 } ) ,
881882 1 ,
882883 ) ;
@@ -903,6 +904,7 @@ mod tests {
903904 worker_id,
904905 worker_local_queue_depth: 3 ,
905906 cpu_time_nanos: 11 ,
907+ ..
906908 } if worker_id == WorkerId :: from( 7usize )
907909 ) ) ;
908910 }
@@ -987,6 +989,7 @@ mod tests {
987989 worker_id: WorkerId :: from( 0usize ) ,
988990 worker_local_queue_depth: 0 ,
989991 cpu_time_nanos: 0 ,
992+ tid: 0 ,
990993 } ,
991994 TelemetryEvent :: QueueSample {
992995 timestamp_nanos: 5_000_000 ,
@@ -998,6 +1001,7 @@ mod tests {
9981001 worker_local_queue_depth: 0 ,
9991002 cpu_time_nanos: 0 ,
10001003 sched_wait_delta_nanos: 0 ,
1004+ tid: 0 ,
10011005 } ,
10021006 ] ;
10031007 let idle = detect_idle_workers ( & events) ;
@@ -1101,13 +1105,15 @@ mod tests {
11011105 worker_id: WorkerId :: from( 0usize ) ,
11021106 worker_local_queue_depth: 0 ,
11031107 cpu_time_nanos: 0 ,
1108+ tid: 0 ,
11041109 } ,
11051110 TelemetryEvent :: WorkerUnpark {
11061111 timestamp_nanos: 5_000_000 ,
11071112 worker_id: WorkerId :: from( 0usize ) ,
11081113 worker_local_queue_depth: 0 ,
11091114 cpu_time_nanos: 0 ,
11101115 sched_wait_delta_nanos: 200_000 , // 200us
1116+ tid: 0 ,
11111117 } ,
11121118 ] ;
11131119 let delays = detect_sched_delays ( & events, 100_000 ) ; // 100us threshold
@@ -1126,13 +1132,15 @@ mod tests {
11261132 worker_id: WorkerId :: from( 0usize ) ,
11271133 worker_local_queue_depth: 0 ,
11281134 cpu_time_nanos: 0 ,
1135+ tid: 0 ,
11291136 } ,
11301137 TelemetryEvent :: WorkerUnpark {
11311138 timestamp_nanos: 2_000_000 ,
11321139 worker_id: WorkerId :: from( 0usize ) ,
11331140 worker_local_queue_depth: 0 ,
11341141 cpu_time_nanos: 0 ,
11351142 sched_wait_delta_nanos: 50_000 , // 50us
1143+ tid: 0 ,
11361144 } ,
11371145 ] ;
11381146 let delays = detect_sched_delays ( & events, 100_000 ) ;
@@ -1147,26 +1155,30 @@ mod tests {
11471155 worker_id: WorkerId :: from( 0usize ) ,
11481156 worker_local_queue_depth: 0 ,
11491157 cpu_time_nanos: 0 ,
1158+ tid: 0 ,
11501159 } ,
11511160 TelemetryEvent :: WorkerPark {
11521161 timestamp_nanos: 1_000_000 ,
11531162 worker_id: WorkerId :: from( 1usize ) ,
11541163 worker_local_queue_depth: 0 ,
11551164 cpu_time_nanos: 0 ,
1165+ tid: 0 ,
11561166 } ,
11571167 TelemetryEvent :: WorkerUnpark {
11581168 timestamp_nanos: 3_000_000 ,
11591169 worker_id: WorkerId :: from( 0usize ) ,
11601170 worker_local_queue_depth: 0 ,
11611171 cpu_time_nanos: 0 ,
11621172 sched_wait_delta_nanos: 500_000 , // 500us
1173+ tid: 0 ,
11631174 } ,
11641175 TelemetryEvent :: WorkerUnpark {
11651176 timestamp_nanos: 4_000_000 ,
11661177 worker_id: WorkerId :: from( 1usize ) ,
11671178 worker_local_queue_depth: 0 ,
11681179 cpu_time_nanos: 0 ,
11691180 sched_wait_delta_nanos: 10_000 , // 10us - below threshold
1181+ tid: 0 ,
11701182 } ,
11711183 ] ;
11721184 let delays = detect_sched_delays ( & events, 100_000 ) ;
@@ -1354,13 +1366,15 @@ mod tests {
13541366 worker_id: WorkerId :: from( 0usize ) ,
13551367 worker_local_queue_depth: 0 ,
13561368 cpu_time_nanos: 0 ,
1369+ tid: 0 ,
13571370 } ,
13581371 TelemetryEvent :: WorkerUnpark {
13591372 timestamp_nanos: 6_000_000 ,
13601373 worker_id: WorkerId :: from( 0usize ) ,
13611374 worker_local_queue_depth: 0 ,
13621375 cpu_time_nanos: 0 ,
13631376 sched_wait_delta_nanos: 0 ,
1377+ tid: 0 ,
13641378 } ,
13651379 ] ;
13661380 let idle = detect_idle_workers ( & events) ;
0 commit comments