Skip to content

Update polkadot v0.9.36 #878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add BenchmarkError::Weightless (#873)
* add BenchmarkError::Weightless

* Update benchmarking/src/lib.rs

Co-authored-by: zjb0807 <[email protected]>

Co-authored-by: zjb0807 <[email protected]>
  • Loading branch information
insipx and zjb0807 committed Jan 17, 2023
commit 86b73415dd4180f01e2900a29cb9e9b3f96756e0
19 changes: 19 additions & 0 deletions benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,14 @@ macro_rules! impl_benchmark_test_suite {
$crate::str::from_utf8(benchmark_name)
.expect("benchmark name is always a valid string!"),
);
},
$crate::BenchmarkError::Weightless => {
// This is considered a success condition.
$crate::log::error!(
"WARNING: benchmark error weightless skipped - {}",
$crate::str::from_utf8(benchmark_name)
.expect("benchmark name is always a valid string!"),
);
}
}
},
Expand Down Expand Up @@ -1314,6 +1322,17 @@ macro_rules! add_benchmark {
.expect("benchmark name is always a valid string!")
);
None
},
Err($crate::BenchmarkError::Weightless) => {
$crate::log::error!(
"WARNING: benchmark weightless skipped - {}",
$crate::str::from_utf8(benchmark)
.expect("benchmark name is always a valid string!")
);
Some(vec![$crate::BenchmarkResult {
components: selected_components.clone(),
.. Default::default()
}])
}
};

Expand Down