Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VSC-6] Add benchmarking setup #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

krendelhoff2
Copy link
Member

@krendelhoff2 krendelhoff2 commented Feb 20, 2025

How to run:

npm run compile:benchmark-did-change
node ./out/benchmark-did-change.js --verbose --root=<path_to_root> --file=game-launcher/src/game_launcher_backend/launchpad/swap.mo

npm run compile:benchmark-init
node ./out/benchmark-init.js --verbose --root=<path_to_root>

<path_to_root> should have some big motoko project e.g. game-launcher, power-equalizer which could be installed via:

git clone https://github.com/BoomDAO/game-launcher.git
git clone https://github.com/flowerpowerdao/power-equalizer.git

@krendelhoff2 krendelhoff2 self-assigned this Feb 20, 2025
@krendelhoff2 krendelhoff2 force-pushed the krendelhoff/vsc-6-benchmark-server branch 2 times, most recently from 4b2dae9 to 1c7fb9e Compare February 23, 2025 13:19
@krendelhoff2 krendelhoff2 force-pushed the krendelhoff/vsc-6-benchmark-server branch from 1c7fb9e to affb7f6 Compare February 24, 2025 07:46
Comment on lines +443 to +446
const key =
keys.length === 1
? keys[0]
: 'local';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is auto-formating I guess. Is it a standard one? Do you think that Dfinity developers will have the same setting?

loadingPackages = false;
notifyWorkspace(); // Update virtual file system
notifyDfxChange(); // Reload dfx.json
connection.sendNotification('custom/initialized', {});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see why this hack is needed, but please add some comments on why it's needed. Someone who is not in the context of the benchmarks could be surprised by this.

params: object,
times: number,
): Promise<number[]> {
assert(times > 1, 'times must be greater than 0');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be times > 0 here and in other places accepting times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants