dfinity / canister-profiling

Collection of canister performance benchmarks
Apache License 2.0
21 stars 8 forks source link

Specify mops as a prerequisite/dependency #88

Closed dansteren closed 11 months ago

dansteren commented 11 months ago

I tried following the steps in how to reproduce performance report and got the following error:

canister-profiling/heartbeat $ make -e MOC_VERSION=0.10.0

set -e; cd motoko; envsubst < mops.template.toml > mops.toml; mops install; dfx canister create --all; dfx ledger fabricate-cycles --t 100 --canister $(dfx identity get-wallet); dfx build; rm mops.toml;         echo "Optimize with ic-wasm"; for f in .dfx/local/canisters//*/*.wasm; do ic-wasm -o $f $f shrink --optimize O3 --keep-name-section; done; cd ..
/bin/sh: 1: mops: not found
make: *** [Makefile:7: motoko] Error 127

It seems I need to install mops before I can proceed.

npm i -g ic-mops

It would be good to document this, or maybe even create a package.json with this as a dependency so you can just npm install and have install mops locally. I generally prefer to install dependencies without the -g flag, even for CLI tools.

dansteren commented 11 months ago

I think there are also deps on ic-wasm, and ic-repl if not others. This issue is likely more than just the mops dependency, but that there are many prerequisites that need to be installed before being able to run the performance report and they should all be specified and directions given for their installation.