Benchmark Timestamp Pallet (#4891)

* Add selected_benchmark! macro.

* Use selected_benchmark! in Identity pallet.

* Implement timestamp pallet benchmark.

* Fix some nits.

* Bump impl_version.
This commit is contained in:
Marcio Diaz
2020-02-12 11:00:08 +01:00
committed by GitHub
parent b34df420f8
commit ae70b10326
6 changed files with 163 additions and 43 deletions
+2 -1
View File
@@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 216,
impl_version: 0,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
};
@@ -813,6 +813,7 @@ impl_runtime_apis! {
{
match module.as_slice() {
b"pallet-identity" | b"identity" => Identity::run_benchmark(extrinsic, steps, repeat).ok(),
b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(extrinsic, steps, repeat).ok(),
_ => return None,
}
}