libp2p / libp2p/js-libp2p

perf: Add component level performance benchmarks per PR

Open
#2,120 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/discussion need/analysis
Dominant language
TypeScript
Stars
2.6k
Forks
546
Avg merge
8h 18m
Merged PRs (30d)
16

Description

As discussed in pl-strflt.notion.site/js-libp2p-perf-benchmarking-f7c42f96cbd44799a321347f6c15c8d4?pvs=4

In order to detect performance regressions at the component level, it may be useful to run component level benchmarks per PR. We've seen scenarios where mplex is more performant than yamux, despite mplex being deprecated. We could leverage the existing perf implementation and a Github action to create a comment such as this one https://github.com/ChainSafe/lodestar/pull/6004#issuecomment-1737257011

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/bench/comparison.bench.ts and the repository's existing performance implementation, then compare the proposed GitHub Actions workflow with the linked Lodestar pull request comment. Done means component-level benchmarks run for each pull request and publish a comment that makes performance regressions visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.