-
Notifications
You must be signed in to change notification settings - Fork 229
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
Benchmark Testing POC #10975
Draft
muhammadahmadasifbhatti
wants to merge
2
commits into
master
Choose a base branch
from
ahmad-benchmark-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Benchmark Testing POC #10975
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
erights
added a commit
that referenced
this pull request
Feb 11, 2025
This was referenced Feb 11, 2025
erights
added a commit
to endojs/endo
that referenced
this pull request
Feb 13, 2025
Closes: #XXXX Refs: Agoric/agoric-sdk#10975 Agoric/agoric-sdk#10982 ## Description Using the benchmark tool from #10975 by @muhammadahmadasifbhatti as modified by #10982 to produce flamegraphs (interactive in vscode) I iterated on that benchmark test which already had very specific simple examples exercising `passStyleOf`. Together with the snippet at https://github.com/Agoric/agoric-sdk/blob/acbb5da3c5a52bab8db319fd696aed70146f9a89/.github/actions/restore-node/action.yml#L156 (which @gibson042 brought to my attention) ```sh $ scripts/get-packed-versions.sh ~/endo | scripts/resolve-versions.sh $ yarn install && yarn build $ cd packages/benchmark-test $ yarn bench ``` and then clicking on the latest *.cpuprofile file, assuming you've already installed the https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame vscode extension. I was able to iterate and tinker on possible improvements, to see what made how much of a difference. This PR has the improvements to `passStyleOf` that I and my reviewers have came up with so far. @gibson042 suggested the main technique used: to avoid redundant checking by breaking up `assertValid` so we could still running the checks of `canBeValid` twice. ### Security Considerations I claim that this PR is a pure refactoring. If true, none. ***Reviewers***, please review with a skeptical eye. `passStyleOf` is security critical, so any observable difference might lead to an opportunity for an adversary. ### Scaling Considerations Even though I iterated on a specialized benchmark exercising `passStyleOf`, I believe I only made changes that would also be an improvement for the typical cases. ### Documentation Considerations If this is a pure refactor, none. ### Testing Considerations If this is a pure refactor, none. In fact, this PR did not need to change any tests, providing some weak evidence that it is indeed a pure refactor. ### Compatibility Considerations If this is a pure refactor, none. ### Upgrade Considerations If this is a pure refactor, none.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is PR is just a minimalistic POC to create a small tool for the benchmark testing.
How to run locally
Run the command
yarn test
in thepackages/benchmark-test
folder.Pre-reqs of running
yarn test
Install
esvu
globallySelect the
v8
andxs
from CLI so that it can download the binaries of those engines.Install
eshost-cli
globally.Run the following commands to configure the binaries of engines with
eshost
.eshost --add "v8" d8 $ESHOST_PATH_V8
eshost --add "xs" xs $ESHOST_PATH_XS
Now you are good to go to run
yarn test