-
Notifications
You must be signed in to change notification settings - Fork 16
perf(ensv2): address label-heal and DB-lookup hotspots #1989
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
Open
shrugs
wants to merge
20
commits into
main
Choose a base branch
from
fix/ensv2-indexing-slowness
base: main
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.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ef8a9c3
perf(ensv2): skip label healing when label already indexed
shrugs 16abf3d
perf(ensv2): memoize ensureAccount within the indexer process
shrugs e6523a1
perf(protocol-acceleration): memoize node migration status
shrugs 1895a9b
chore(ensindexer): log indexing throughput every minute
shrugs 6ae1f92
chore: add @ensnode/ensindexer-perf-testing package
shrugs aba0e5b
Merge branch 'main' into fix/ensv2-indexing-slowness
shrugs 9a114e5
fix: openapi-spec
shrugs 7e480ac
fix: pnpm install new package
shrugs 55a0916
chore(perf-testing): rename grafana datasource provisioning file
shrugs c8f9c57
fix(ensv2): restore hash-only → plaintext upgrade in RegistrarController
shrugs 2ae4867
test(ensindexer): mock @/lib/logger in ponder.test.ts
shrugs 638bdc5
style: tighten comments + biome format
shrugs 0726714
Merge branch 'main' into fix/ensv2-indexing-slowness
shrugs 5c1b621
fix(perf-testing): pin images, bind loopback, fix uid + panel overlap
shrugs a067a75
chore(perf-testing): extract wipe into wipe.sh
shrugs 88edd41
docs(ensindexer): correct eventHandlerPreconditions comment
shrugs 578b898
fix: typo
shrugs 8301161
refactor(protocol-acceleration): fold nodeIsMigrated cache into a sin…
shrugs fb3639b
refactor: tighten memo pattern across ensureAccount + nodeIsMigrated
shrugs 543dc1e
chore: rename module-local memo to `cache`
shrugs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # @ensnode/ensindexer-perf-testing | ||
|
|
||
| Local Prometheus + Grafana bundle for benchmarking ENSIndexer throughput. | ||
|
|
||
| ## What's in the box | ||
|
|
||
| - **Prometheus** on `http://localhost:9090`, scraping `host.docker.internal:42069/metrics` every 5s (6h retention, admin API enabled). | ||
| - **Grafana** on `http://localhost:3001` (anonymous admin, no login) with a pre-provisioned Prometheus datasource and a **Ponder / ensindexer** dashboard. | ||
|
|
||
| Dashboard panels are tuned for indexer perf work: | ||
|
|
||
| - Top handlers by share of wall-clock time (`rate(ponder_indexing_function_duration_sum[1m]) / 1000`) | ||
| - Handler p95 duration (top 15) | ||
| - Events/sec per event and total | ||
| - Total events per handler (bar gauge) | ||
| - Synced block + historical blocks/sec per chain | ||
| - RPC req/s + p95 duration per chain/method | ||
| - Node event-loop lag p99, Postgres queue size, DB store queries/sec | ||
|
|
||
| ## Usage | ||
|
|
||
| From this package's directory: | ||
|
|
||
| ```bash | ||
| pnpm up # start prometheus + grafana | ||
| pnpm down # stop and remove containers | ||
| pnpm logs # tail container logs | ||
| pnpm wipe # purge prometheus series (useful between benchmark runs) | ||
| ``` | ||
|
|
||
| Then start the indexer in another terminal (`pnpm -F ensindexer dev`) and open the dashboard at <http://localhost:3001/d/ensindexer>. | ||
|
|
||
| The scrape target is `host.docker.internal:42069` — on macOS that resolves to the host via the `host-gateway` declaration in the compose file. On Linux hosts you may need Docker 20.10+ for the same behavior. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| services: | ||
| prometheus: | ||
| image: prom/prometheus:v2.55.1 | ||
| container_name: ensnode-prometheus | ||
| # bound to loopback to avoid exposing publicly | ||
| ports: | ||
| - "127.0.0.1:9090:9090" | ||
| volumes: | ||
| - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro | ||
| command: | ||
| - --config.file=/etc/prometheus/prometheus.yml | ||
| - --storage.tsdb.retention.time=6h | ||
| - --web.enable-admin-api | ||
|
shrugs marked this conversation as resolved.
|
||
| extra_hosts: | ||
| - "host.docker.internal:host-gateway" | ||
|
|
||
| grafana: | ||
| image: grafana/grafana:11.3.0 | ||
| container_name: ensnode-grafana | ||
| # bound to loopback to avoid exposing publicly | ||
| ports: | ||
| - "127.0.0.1:3001:3000" | ||
| environment: | ||
| GF_AUTH_ANONYMOUS_ENABLED: "true" | ||
| GF_AUTH_ANONYMOUS_ORG_ROLE: Admin | ||
| GF_AUTH_DISABLE_LOGIN_FORM: "true" | ||
| volumes: | ||
| - ./grafana/provisioning:/etc/grafana/provisioning:ro | ||
| - ./grafana/dashboards:/var/lib/grafana/dashboards:ro | ||
| depends_on: | ||
| - prometheus | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.