Skip to content

Commit 9d7f55d

Browse files
authored
Merge pull request #278 from hypha-space/leo/fix_batch_scheduling_w_statistics
Leo/fix batch scheduling w statistics
2 parents 587db84 + 8132a30 commit 9d7f55d

File tree

5 files changed

+161
-70
lines changed

5 files changed

+161
-70
lines changed

crates/messages/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub mod action {
9898
Idle,
9999
BatchCompleted {
100100
batch_size: u32,
101+
batches: u32,
101102
},
102103
SentUpdate {
103104
round: u32,

crates/scheduler/src/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,13 @@ mod tests {
913913

914914
pool_with_stats.update_statistics(&peer_id, |stats, last_updated| {
915915
if *last_updated > 0 {
916-
stats.update(10u64.saturating_sub(*last_updated));
916+
stats.update(10u64.saturating_sub(*last_updated), 1);
917917
}
918918
*last_updated = 10;
919919
});
920920
pool_with_stats.update_statistics(&peer_id, |stats, last_updated| {
921921
if *last_updated > 0 {
922-
stats.update(25u64.saturating_sub(*last_updated));
922+
stats.update(25u64.saturating_sub(*last_updated), 1);
923923
}
924924
*last_updated = 25;
925925
});

0 commit comments

Comments
 (0)