MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.28k stars 11.22k forks source link

[indexer-alt] Add benchmark command #20352

Closed lxfind closed 1 week ago

lxfind commented 1 week ago

Description

This PR adds a benchmark command to indexer-alt. It would start the indexer using the provided parameters, start and stop based on the local ingestion data. It then measures the time and TPS. A few structural changes to indexer-alt code:

  1. Moved lag and pruner options to a dedicated sequential pipeline config, since these params only make sense in a sequential pipeline setting.
  2. Moved all the indexer start logic to a dedicated function, so that I can reuse it in the benchmark.
  3. Added option to not bootstrap genesis if not needed.

Test plan

Run locally


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 8:15pm
3 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **multisig-toolkit** | ⬜️ Ignored ([Inspect](https://vercel.com/mysten-labs/multisig-toolkit/Bmqt635UE47f4PyY9w4ciPahaRLs)) | [Visit Preview](https://multisig-toolkit-git-indexer-alt-benchmark-mysten-labs.vercel.app) | | Nov 21, 2024 8:15pm | | **sui-kiosk** | ⬜️ Ignored ([Inspect](https://vercel.com/mysten-labs/sui-kiosk/EZ1tU5dqeB3hye64WLhRqyBG4PHS)) | [Visit Preview](https://sui-kiosk-git-indexer-alt-benchmark-mysten-labs.vercel.app) | | Nov 21, 2024 8:15pm | | **sui-typescript-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/mysten-labs/sui-typescript-docs/FkjdwFPVQfh9utp9FJUMWKQByD6R)) | [Visit Preview](https://sui-typescript-docs-git-indexer-alt-benchmark-mysten-labs.vercel.app) | | Nov 21, 2024 8:15pm |
lxfind commented 1 week ago

simulacrum always generates the genesis checkpoint, and we always bootstrap the genesis table, even during benchmarks?

I was hoping to be able to also download some checkpoint data from mainnet, and use them to benchmark the indexer. The genesis checkpoint would not be there. Another option is to allow using some default genesis value in benchmark mode