Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1da1683
Update dependencies to v0.9.38
sea212 Aug 20, 2023
398d8f7
More dependency updates
sea212 Aug 20, 2023
ab47324
Update standalone runtimes
sea212 Aug 20, 2023
2a60e3c
Fix build with feature runtime-benchmark
sea212 Aug 21, 2023
2fd134e
Update Zeitgeist parachain runtime
sea212 Aug 21, 2023
45b86e7
Update Battery Station parachain runtime
sea212 Aug 22, 2023
3237a78
Deduplicated dependencies
sea212 Aug 22, 2023
5ce5bb8
Make tests succeed for parachain runtime
sea212 Aug 22, 2023
37d6aee
Partially fix Zeitgeist xcm tests
sea212 Aug 22, 2023
2ad2d88
Make all runtime tests succeed
sea212 Aug 23, 2023
4089ecd
Update standalone client
sea212 Aug 23, 2023
504d3f1
Update parachain node
sea212 Aug 23, 2023
6a6f9ea
Add migrations
sea212 Aug 23, 2023
2d54592
Cargo fmt
sea212 Aug 23, 2023
b11c260
Satisfy Clippy
sea212 Aug 23, 2023
30af891
Cargo fmt
sea212 Aug 23, 2023
21ce803
Taplo format
sea212 Aug 23, 2023
9646a85
Update licenses
sea212 Aug 23, 2023
fe589a5
Reduce runtime test dependencies by half
sea212 Aug 23, 2023
41d09c5
Add missing runtime-benchmark feature
sea212 Aug 23, 2023
ab0e64a
Use upper case copyright name
sea212 Aug 23, 2023
2599c7d
Remove test logger
sea212 Aug 23, 2023
c684f28
Revert "Reduce runtime test dependencies by half"
sea212 Aug 24, 2023
9ad7516
Update weight templates
sea212 Aug 24, 2023
a4a7648
Use header option for benchmarks
sea212 Aug 24, 2023
c586c61
Update rust-toolchain
sea212 Aug 24, 2023
4d0cc4d
Satisfy clippy
sea212 Aug 25, 2023
abd7ed5
Use patched wasm-builder for new rustc
sea212 Aug 25, 2023
a3a18db
Format
sea212 Aug 25, 2023
9dd8010
Update licenses
sea212 Aug 25, 2023
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
Use header option for benchmarks
Also format benchmark script and moves header file into HEADER_GPL3.
  • Loading branch information
sea212 committed Aug 24, 2023
commit a4a7648f2e57d4a663ed1a47f4623c98078d01f3
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
18 changes: 0 additions & 18 deletions misc/frame_weight_template.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
//
// Zeitgeist is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
//
// Zeitgeist is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

{{header}}
//! Autogenerated weights for {{pallet}}
//!
Expand Down
18 changes: 0 additions & 18 deletions misc/orml_weight_template.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
//
// Zeitgeist is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
//
// Zeitgeist is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

{{header}}
//! Autogenerated weights for {{pallet}}
//!
Expand Down
18 changes: 0 additions & 18 deletions misc/weight_template.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
//
// Zeitgeist is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
//
// Zeitgeist is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

{{header}}
//! Autogenerated weights for {{pallet}}
//!
Expand Down
3 changes: 2 additions & 1 deletion scripts/benchmarks/configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ else
export PROFILE_DIR="$PROFILE"
fi
export EXECUTION="${EXECUTION:-wasm}"
export ADDITIONAL="${ADDITIONAL:-}"
export ADDITIONAL_PARAMS="${ADDITIONAL:-}"
export ADDITIONAL_FEATURES="${ADDITIONAL_FEATURES:-with-global-disputes}"
export HEADER="${HEADER:-./HEADER_GPL3}"
2 changes: 1 addition & 1 deletion scripts/benchmarks/quick_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export ZEITGEIST_PALLETS_RUNS=0

export PROFILE=release
export PROFILE_DIR=release
export ADDITIONAL=--detailed-log-output
export ADDITIONAL_PARAMS=--detailed-log-output
export EXECUTION=native
# TODO(#848) Delete this, when global disputes is on main-net
export ADDITIONAL_FEATURES=with-global-disputes
Expand Down
66 changes: 60 additions & 6 deletions scripts/benchmarks/run_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,82 @@ source ./scripts/benchmarks/configuration.sh

# Standalone benchmarks

cargo build --profile=$PROFILE --features=runtime-benchmarks,$ADDITIONAL_FEATURES --bin=zeitgeist
cargo build \
--profile=$PROFILE \
--features=runtime-benchmarks,$ADDITIONAL_FEATURES \
--bin=zeitgeist

for pallet in ${FRAME_PALLETS[@]}; do
./target/$PROFILE_DIR/zeitgeist benchmark pallet --chain=dev --steps=$FRAME_PALLETS_STEPS --repeat=$FRAME_PALLETS_RUNS --pallet=$pallet --extrinsic='*' --execution=$EXECUTION $ADDITIONAL --wasm-execution=compiled --heap-pages=4096 --template=$FRAME_WEIGHT_TEMPLATE --output=$EXTERNAL_WEIGHTS_PATH
./target/$PROFILE_DIR/zeitgeist benchmark pallet \
--chain=dev \
--steps=$FRAME_PALLETS_STEPS \
--repeat=$FRAME_PALLETS_RUNS \
--pallet=$pallet \
--extrinsic='*' \
--execution=$EXECUTION \
--wasm-execution=compiled \
--heap-pages=4096 \
--template=$FRAME_WEIGHT_TEMPLATE \
--header=$HEADER \
--output=$EXTERNAL_WEIGHTS_PATH \
$ADDITIONAL_PARAMS
done

for pallet in ${ORML_PALLETS[@]}; do
./target/$PROFILE_DIR/zeitgeist benchmark pallet --chain=dev --steps=$ORML_PALLETS_STEPS --repeat=$ORML_PALLETS_RUNS --pallet=$pallet --extrinsic='*' --execution=$EXECUTION $ADDITIONAL --wasm-execution=compiled --heap-pages=4096 --template=$ORML_WEIGHT_TEMPLATE --output=$EXTERNAL_WEIGHTS_PATH
./target/$PROFILE_DIR/zeitgeist benchmark pallet \
--chain=dev \
--steps=$ORML_PALLETS_STEPS \
--repeat=$ORML_PALLETS_RUNS \
--pallet=$pallet \
--extrinsic='*' \
--execution=$EXECUTION \
--wasm-execution=compiled \
--heap-pages=4096 \
--template=$ORML_WEIGHT_TEMPLATE \
--header=$HEADER \
--output=$EXTERNAL_WEIGHTS_PATH \
$ADDITIONAL_PARAMS
done

for pallet in ${ZEITGEIST_PALLETS[@]}; do
pallet_folder_name=${pallet//zrml_/}
pallet_folder_name=${pallet_folder_name//_/-}
./target/$PROFILE_DIR/zeitgeist benchmark pallet --chain=dev --steps=$ZEITGEIST_PALLETS_STEPS --repeat=$ZEITGEIST_PALLETS_RUNS --pallet=$pallet --extrinsic='*' --execution=$EXECUTION $ADDITIONAL --wasm-execution=compiled --heap-pages=4096 --template=$ZEITGEIST_WEIGHT_TEMPLATE --output=./zrml/$pallet_folder_name/src/weights.rs
./target/$PROFILE_DIR/zeitgeist benchmark pallet \
--chain=dev \
--steps=$ZEITGEIST_PALLETS_STEPS \
--repeat=$ZEITGEIST_PALLETS_RUNS \
--pallet=$pallet \
--extrinsic='*' \
--execution=$EXECUTION \
--wasm-execution=compiled \
--heap-pages=4096 \
--template=$ZEITGEIST_WEIGHT_TEMPLATE \
--header=$HEADER \
--output=./zrml/$pallet_folder_name/src/weights.rs \
$ADDITIONAL_PARAMS
done

# Parachain benchmarks

cargo build --profile=$PROFILE --features=runtime-benchmarks,parachain,$ADDITIONAL_FEATURES --bin=zeitgeist
cargo build \
--profile=$PROFILE \
--features=runtime-benchmarks,parachain,$ADDITIONAL_FEATURES \
--bin=zeitgeist

for pallet in ${FRAME_PALLETS_PARACHAIN[@]}; do
./target/$PROFILE_DIR/zeitgeist benchmark pallet --chain=dev --steps=$FRAME_PALLETS_PARACHAIN_STEPS --repeat=$FRAME_PALLETS_PARACHAIN_RUNS --pallet=$pallet --extrinsic='*' --execution=$EXECUTION $ADDITIONAL --wasm-execution=compiled --heap-pages=4096 --template=$FRAME_WEIGHT_TEMPLATE --output=$EXTERNAL_WEIGHTS_PATH
./target/$PROFILE_DIR/zeitgeist benchmark pallet \
--chain=dev \
--steps=$FRAME_PALLETS_PARACHAIN_STEPS \
--repeat=$FRAME_PALLETS_PARACHAIN_RUNS \
--pallet=$pallet \
--extrinsic='*' \
--execution=$EXECUTION \
--wasm-execution=compiled \
--heap-pages=4096 \
--template=$FRAME_WEIGHT_TEMPLATE \
--header=$HEADER \
--output=$EXTERNAL_WEIGHTS_PATH \
$ADDITIONAL_PARAMS
done

cargo fmt