Add CI and local tooling to measure subgraph size and indexing performance
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 7
- Avg merge
- 4h 1m
- Merged PRs (30d)
- 6
Description
Problem
We have no repeatable way to measure subgraph size and indexing performance. That means we cannot tell whether a change improves or regresses performance, or by how much. This matters most right now for the cumulative factor stake and earnings feature (livepeer/subgraph#238, PR livepeer/subgraph#217), where we want confidence it is implemented efficiently before merging. As the subgraph grows with new data, indexing cost and size need to be guarded continuously.
Proposed solution
Add tooling, runnable both locally and in CI, that measures:
- Subgraph manifest and build size, and entity counts
- Indexing and sync performance against a fixed block range
- Per mapping or per handler cost where feasible
Surface the results in CI on pull requests so size and performance deltas are visible before merge, and capture a baseline on the current subgraph for comparison.
Scope
- Local script to measure size and indexing performance against a fixed range
- CI workflow that runs the measurement on pull requests and reports the delta
- A baseline captured on the current subgraph
Out of scope
- Fixing the performance issues themselves, tracked under the audit in #179
- Feature work, tracked in livepeer/subgraph#238
Why now
This gates merging the stake and earnings indexing feature (livepeer/subgraph#238, PR livepeer/subgraph#217) with confidence that it is efficient, and it lets us verify the pre feature performance improvements tracked in #179.
Related
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the proposed local measurement script and CI workflow, using a fixed block range to establish the current-subgraph baseline for manifest/build size, entity counts, and indexing or sync performance. Done means the measurements run locally and on pull requests, report deltas, and capture the baseline; per-mapping costs are included where feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd, performance, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100