Add Weightless benchmark bailing (#12829)

* Calls can be 'Weightless'

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix (child)-bounties benches

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Just use one dummy value

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* 🤦

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-12-02 20:14:21 +00:00
committed by GitHub
parent 585492ee83
commit 3af87703de
4 changed files with 49 additions and 14 deletions
@@ -162,6 +162,11 @@ pub enum BenchmarkError {
/// The benchmarking pipeline is allowed to fail here, and we should simply
/// skip processing these results.
Skip,
/// No weight can be determined; set the weight of this call to zero.
///
/// You can also use `Override` instead, but this is easier to use since `Override` expects the
/// correct components to be present.
Weightless,
}
impl From<BenchmarkError> for &'static str {
@@ -170,6 +175,7 @@ impl From<BenchmarkError> for &'static str {
BenchmarkError::Stop(s) => s,
BenchmarkError::Override(_) => "benchmark override",
BenchmarkError::Skip => "benchmark skip",
BenchmarkError::Weightless => "benchmark weightless",
}
}
}