Skip to content

Commit

Permalink
🐛 ($SCRIPT) Fix Syntax error 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenPocketGamer committed Oct 27, 2021
1 parent de85f38 commit 8f668e5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ test-benchmarking:

.PHONY: generate-bifrost-weights
generate-bifrost-weights:
sh ./scripts/generate-weights.sh bifrost
bash ./scripts/generate-weights.sh bifrost

.PHONY: generate-asgard-weights
generate-asgard-weights:
sh ./scripts/generate-weights.sh asgard
bash ./scripts/generate-weights.sh asgard

.PHONY: generate-all-weights
generate-all-weights:
sh ./scripts/generate-weights.sh asgard bifrost
bash ./scripts/generate-weights.sh asgard bifrost

.PHONY: build-asgard-release-with-bench
build-asgard-release-with-bench: copy-genesis-config-release
Expand Down
34 changes: 17 additions & 17 deletions scripts/generate-weights.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## EXAMPLE
##
Expand All @@ -10,27 +10,27 @@
# sh ./script/generate-weights.sh asgard bifrost

# 1. Build all-release which is added with "runtime-benchmarks" feature;
# make "build-all-release-with-bench"
make "build-all-release-with-bench"
# 2. Filter the pallets of ${runtime} that should be executed benchmark;
IFS=', ' read -r -a runtimes <<< $@;
for runtime in "${runtimes[@]}"
do
chain="${runtime}-local"
echo $chain
# target/release/bifrost benchmark --chain=$chain --list | sed -n '2,$p' | grep -Eio "^\w+" | uniq |
# while IFS= read -r line
# do
# pallet=$line;
target/release/bifrost benchmark --chain=$chain --list | sed -n '2,$p' | grep -Eio "^\w+" | uniq |
while IFS= read -r line
do
pallet=$line;

# target/release/bifrost benchmark --chain=$chain \
# --steps=50 \
# --repeat=20 \
# --pallet=$pallet \
# --extrinsic="*" \
# --execution=wasm \
# --wasm-execution=compiled \
# --heap-pages=4096 \
# --header=./HEADER-GPL3 \
# --output="./runtime/${runtime}/src/weights/${pallet}.rs";
# done
target/release/bifrost benchmark --chain=$chain \
--steps=50 \
--repeat=20 \
--pallet=$pallet \
--extrinsic="*" \
--execution=wasm \
--wasm-execution=compiled \
--heap-pages=4096 \
--header=./HEADER-GPL3 \
--output="./runtime/${runtime}/src/weights/${pallet}.rs";
done
done

0 comments on commit 8f668e5

Please sign in to comment.