This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run build # Compile TypeScript (uses tsconfig.build.json)
npm test # Run all tests with Jest
npm test -- --watch # Run tests in watch mode
npm test -- path/to/test.spec.ts # Run a single test file
npm run lint # Run ESLint
npm run fix # Run ESLint with auto-fix
npm run format # Format code with Prettier
npm run format:check # Check formatting without modifyingThis is a GitHub Action that collects benchmark results from various tools and tracks them over time, optionally publishing to GitHub Pages.
src/index.ts- Entry point that orchestrates the actionsrc/config.ts- Parses and validates action inputs fromaction.ymlsrc/extract.ts- Parses benchmark output from 12+ supported tools (cargo, go, benchmarkjs, pytest, googlecpp, catch2, julia, jmh, benchmarkdotnet, benchmarkluau, customBiggerIsBetter, customSmallerIsBetter)src/write.ts- Handles result storage: commits to gh-pages branch, alerts on regressions, and generates dashboard HTML
BenchmarkResult- Single benchmark measurement with name, value, unit, optional range/extraBenchmark- Collection of results tied to a commitConfig- All action configuration from inputs
Each benchmark tool has its own extraction function in src/extract.ts (e.g., extractGoResult, extractCargoResult, extractBenchmarkJsResult). These parse tool-specific output formats into the unified BenchmarkResult[] format.
src/comment/ contains logic for posting benchmark comparisons as GitHub commit comments or PR comments when performance regresses beyond a threshold.
The tool input accepts: cargo, go, benchmarkjs, benchmarkluau, pytest, googlecpp, catch2, julia, jmh, benchmarkdotnet, customBiggerIsBetter, customSmallerIsBetter
Test fixtures for each tool's output format are in test/data/extract/. Snapshot tests are in test/__snapshots__/.
- Make the plan extremely concise. Sacrifice grammar for the sake of concision.
- At the end of each plan, give me a list of unresolved questions to answer, if any.
- Avoid using the
as unknown as ExpectedType. Instead use type assertions or make sure that the object complies with the expected type.