Jamie Hill-Daniel 18d0ca0ce9 feat: Use `solana-invoke` insteam of `solana_cpi::invoke` (#3900) 1 ヶ月 前
..
locks 47284f8f0b v0.31.1 (#3666) 5 ヶ月 前
programs d9a9f19394 Fix IDL (#2824) 1 年間 前
scripts 4b12678ca3 bench: Use `agave-install` if Solana is v2 (#3383) 10 ヶ月 前
tests c66b323293 Upgrade Solana to 1.18.8 (#2867) 1 年間 前
Anchor.toml c1667120e6 bench: Add a script to sync benchmark results for all versions (#2477) 2 年 前
Cargo.toml a423f7855b cli: Require explicit `overflow-checks` flag (#2716) 1 年間 前
README.md 9e73317d09 bench: Show Solana version used in tests (#2543) 2 年 前
bench.json 18d0ca0ce9 feat: Use `solana-invoke` insteam of `solana_cpi::invoke` (#3900) 1 ヶ月 前
package.json 47284f8f0b v0.31.1 (#3666) 5 ヶ月 前
tsconfig.json 115679e675 bench: Add benchmarking for stack memory usage (#2617) 2 年 前

README.md

Benchmark tests

The bench program and its tests are used to measure the performance of Anchor programs.

How

We run the same tests that measure some metric for each Anchor version starting from 0.27.0. If the difference between the results is greater than 1%, the new data will be saved in bench.json and Markdown files in /bench will be updated accordingly.

Scripts

:memo: TL;DR
If you've made changes to programs or tests in this directory, run anchor run sync, otherwise run anchor test --skip-lint.

anchor test --skip-lint: Run all tests and update benchmark files when necessary. This is the only command that needs to be run for most use cases.


The following scripts are useful when making changes to how benchmarking works.

anchor run sync: Sync all benchmark files by running tests for each version. If you've made changes to the bench program or its tests, you should run this command to sync the results.

anchor run sync-markdown: Sync Markdown files in /bench based on the data from bench.json.

anchor run generate-ix: Generate program instructions with repetitive accounts.


The following script is only for the maintainer(s) of Anchor.

anchor run bump-version -- --anchor-version <VERSION>: Bump the version in all benchmark files.