From 9f6c1c39fefc9348f409dfe02a8e7db607d3b49a Mon Sep 17 00:00:00 2001
From: bgallois <benjamin@gallois.cc>
Date: Mon, 22 May 2023 10:54:41 +0200
Subject: [PATCH] fix(runtime) fix benchmarks for g1 and gtest

---
 runtime/g1/src/lib.rs    | 19 +++++++++++++------
 runtime/gtest/src/lib.rs | 19 +++++++++++++------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs
index e6cc61575..c6b533d68 100644
--- a/runtime/g1/src/lib.rs
+++ b/runtime/g1/src/lib.rs
@@ -130,16 +130,23 @@ pub type TechnicalCommitteeInstance = Instance2;
 #[cfg(feature = "runtime-benchmarks")]
 mod benches {
     define_benchmarks!(
-        // Duniter
-        // NOTE: Make sure to prefix these with `common_runtime::` so
-        // the that path resolves correctly in the generated file.
-        [common_runtime::oneshot_account, OneshotAccount]
-        [common_runtime::universal_dividend, UniversalDividend]
-        [common_runtime::upgrade_origin, UpgradeOrigin]
+        // For completion, benchmarks only running on `gdev-benchmark`.
+        [pallet_certification, Cert]
+        [pallet_certification, SmithCert]
+        [pallet_oneshot_account, OneshotAccount]
+        [pallet_universal_dividend, UniversalDividend]
+        [pallet_provide_randomness, ProvideRandomness]
+        [pallet_upgrade_origin, UpgradeOrigin]
+        [pallet_duniter_account, Account]
+        [pallet_identity, Identity]
+        [pallet_membership, Membership]
+        [pallet_membership, SmithMembership]
+        [pallet_authority_members, AuthorityMembers]
         // Substrate
         [pallet_balances, Balances]
         [frame_benchmarking::baseline, Baseline::<Runtime>]
         [pallet_collective, TechnicalCommittee]
+        [pallet_session, SessionBench::<Runtime>]
         [pallet_im_online, ImOnline]
         [pallet_multisig, Multisig]
         [pallet_preimage, Preimage]
diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs
index 27d585905..3d2282f26 100644
--- a/runtime/gtest/src/lib.rs
+++ b/runtime/gtest/src/lib.rs
@@ -131,16 +131,23 @@ pub type TechnicalCommitteeInstance = Instance2;
 #[cfg(feature = "runtime-benchmarks")]
 mod benches {
     define_benchmarks!(
-        // Duniter
-        // NOTE: Make sure to prefix these with `common_runtime::` so
-        // the that path resolves correctly in the generated file.
-        [common_runtime::oneshot_account, OneshotAccount]
-        [common_runtime::universal_dividend, UniversalDividend]
-        [common_runtime::upgrade_origin, UpgradeOrigin]
+        // For completion, benchmarks only running on `gdev-benchmark`.
+        [pallet_certification, Cert]
+        [pallet_certification, SmithCert]
+        [pallet_oneshot_account, OneshotAccount]
+        [pallet_universal_dividend, UniversalDividend]
+        [pallet_provide_randomness, ProvideRandomness]
+        [pallet_upgrade_origin, UpgradeOrigin]
+        [pallet_duniter_account, Account]
+        [pallet_identity, Identity]
+        [pallet_membership, Membership]
+        [pallet_membership, SmithMembership]
+        [pallet_authority_members, AuthorityMembers]
         // Substrate
         [pallet_balances, Balances]
         [frame_benchmarking::baseline, Baseline::<Runtime>]
         [pallet_collective, TechnicalCommittee]
+        [pallet_session, SessionBench::<Runtime>]
         [pallet_im_online, ImOnline]
         [pallet_multisig, Multisig]
         [pallet_preimage, Preimage]
-- 
GitLab