git.delta.rocks / unique-network / refs/commits / 18a5c326bd36

difftreelog

ci fix unnecessary node rebuilds during benchmarking

Yaroslav Bolyukin2023-10-12parent: #3db37f4.patch.diff
in: master

1 file changed

modifiedMakefilediffbeforeafterboth
8888
89evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers89evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers
9090
91# TODO: Create benchmarking profile, make it a proper dependency
91.PHONY: _bench92.PHONY: benchmarking-node
92_bench:93benchmarking-node:
93 cargo run --profile production --features runtime-benchmarks,$(RUNTIME) -- \94 cargo build --profile production --features runtime-benchmarks
94 benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \95
95 --wasm-execution compiled --extrinsic '*' \96define _bench =
96 $(if $(TEMPLATE),$(TEMPLATE),--template=.maintain/frame-weight-template.hbs) --steps=50 --repeat=80 --heap-pages=4096 \97.PHONY: bench-$(1)
97 --output=$(if $(OUTPUT),$(OUTPUT),./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs)98bench-$(1): benchmarking-node
9899 ./target/production/unique-collator \
99.PHONY: bench-evm-migration100 benchmark pallet --pallet pallet-$(1) \
100bench-evm-migration:101 --wasm-execution compiled --extrinsic '*' \
101 make _bench PALLET=evm-migration102 $(if $(4),$(4),--template=.maintain/frame-weight-template.hbs) --steps=50 --repeat=80 --heap-pages=4096 \
102103 --output=$$(if $(3),$(3),./pallets/$(if $(2),$(2),$(1))/src/weights.rs)
103.PHONY: bench-configuration104endef
104bench-configuration:105
105 make _bench PALLET=configuration106# _bench,pallet,(pallet_dir|),(output|),(extra|)
106107$(eval $(call _bench,evm-migration))
107.PHONY: bench-common108$(eval $(call _bench,configuration))
108bench-common:109$(eval $(call _bench,common))
109 make _bench PALLET=common110$(eval $(call _bench,unique))
110111$(eval $(call _bench,fungible))
111.PHONY: bench-unique112$(eval $(call _bench,refungible))
112bench-unique:113$(eval $(call _bench,nonfungible))
113 make _bench PALLET=unique114$(eval $(call _bench,structure))
114115$(eval $(call _bench,foreign-assets))
115.PHONY: bench-fungible116$(eval $(call _bench,collator-selection))
116bench-fungible:117$(eval $(call _bench,identity))
117 make _bench PALLET=fungible118$(eval $(call _bench,app-promotion))
118119$(eval $(call _bench,maintenance))
119.PHONY: bench-refungible120$(eval $(call _bench,xcm,,./runtime/common/weights/xcm.rs,"--template=.maintain/external-weights/template.hbs"))
120bench-refungible:
121 make _bench PALLET=refungible
122
123.PHONY: bench-nonfungible
124bench-nonfungible:
125 make _bench PALLET=nonfungible
126
127.PHONY: bench-structure
128bench-structure:
129 make _bench PALLET=structure
130
131.PHONY: bench-foreign-assets
132bench-foreign-assets:
133 make _bench PALLET=foreign-assets
134
135.PHONY: bench-collator-selection
136bench-collator-selection:
137 make _bench PALLET=collator-selection
138
139.PHONY: bench-identity
140bench-identity:
141 make _bench PALLET=identity
142
143.PHONY: bench-app-promotion
144bench-app-promotion:
145 make _bench PALLET=app-promotion
146
147.PHONY: bench-maintenance
148bench-maintenance:
149 make _bench PALLET=maintenance
150
151.PHONY: bench-xcm
152bench-xcm:
153 make _bench PALLET=xcm OUTPUT=./runtime/common/weights/xcm.rs TEMPLATE="--template=.maintain/external-weight-template.hbs"
154121
155.PHONY: bench122.PHONY: bench
156bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity123bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity