Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Nov 18, 2023
1 parent 418a54b commit c2ac667
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@ where
macro_rules! log_scheduler {
($a:tt) => {
info!(
"slot: {}: [{}]({}/{}): state_machine(({}(+{})=>{})/{}) channels(<{} >{}+{} <{}+{})",
"slot: {}: [{}]({}/{}): state_machine(({}(+{})=>{})/{}|{}) channels(<{} >{}+{} <{}+{})",
slot, ($a), (if will_end_thread {"T"} else {"-"}), (if will_end_session {"S"} else {"-"}),
state_machine.active_task_count(), state_machine.retryable_task_count(), state_machine.handled_task_count(),
state_machine.total_task_count(),
state_machine.rescheduled_task_count(),
schedulable_transaction_receiver.len(),
blocked_transaction_sessioned_sender.len(), idle_transaction_sender.len(),
handled_blocked_transaction_receiver.len(), handled_idle_transaction_receiver.len(),
Expand Down Expand Up @@ -1303,6 +1304,7 @@ struct SchedulingStateMachine {
retryable_task_queue: WeightedTaskQueue,
active_task_count: usize,
handled_task_count: usize,
rescheduled_task_count: usize,
total_task_count: usize,
}

Expand All @@ -1323,6 +1325,10 @@ impl SchedulingStateMachine {
self.handled_task_count
}

fn rescheduled_task_count(&self) -> usize {
self.rescheduled_task_count
}

fn total_task_count(&self) -> usize {
self.total_task_count
}
Expand All @@ -1338,6 +1344,7 @@ impl SchedulingStateMachine {
}

fn schedule_retryable_task(&mut self) -> Option<Box<ExecutionEnvironment>> {
self.rescheduled_task_count += 1;
self.retryable_task_queue
.pop_last()
.and_then(|(_, task)| {
Expand Down

0 comments on commit c2ac667

Please sign in to comment.