Move `WeightCounter` to `sp-weights` (#12603)
* Move WeightCounter to sp_weights Signed-off-by:Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename to WeightMeter and test Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix pallet-scheduler for new usage Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update primitives/weights/src/weight_meter.rs Co-authored-by:
David <dvdplm@gmail.com> * More tests for can_accrue Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Clippy Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove defensive_accrue and fixup consumed_ratio I dont think there is a good use-case for defensive_accrue without saturation. Only in tests maybe, will remove for now until we have a use-case. Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Gavin Wood <gavin@parity.io>
Showing
- substrate/frame/scheduler/src/benchmarking.rs 8 additions, 12 deletionssubstrate/frame/scheduler/src/benchmarking.rs
- substrate/frame/scheduler/src/lib.rs 7 additions, 27 deletionssubstrate/frame/scheduler/src/lib.rs
- substrate/primitives/weights/src/lib.rs 4 additions, 0 deletionssubstrate/primitives/weights/src/lib.rs
- substrate/primitives/weights/src/weight_meter.rs 176 additions, 0 deletionssubstrate/primitives/weights/src/weight_meter.rs
Please register or sign in to comment