Skip to main content

Documentation Index

Fetch the complete documentation index at: https://codspeed.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Guides provide comprehensive, hands-on tutorials to help you implement performance testing in your projects. Whether you’re starting from scratch or looking to deepen your benchmarking expertise, these guides walk you through real-world scenarios with complete code examples.
Looking for something specific? Ask questions and share feedback on Discord!

How to Benchmark my Code?

These guides teach you the fundamentals of benchmarking in your language, from writing your first benchmark to running them continuously in CI.

How to Benchmark Python with pytest

Learn benchmarking from scratch with pytest-codspeed: write benchmarks with fixtures, parametrized tests, setup isolation, and integrate with CodSpeed for continuous performance testing.

How to Benchmark Rust with divan

Learn benchmarking from scratch with divan: write benchmarks with arguments, type generics, dynamic inputs, and integrate with CodSpeed for continuous performance testing.

How to Benchmark C++ with Google Benchmark

Learn benchmarking from scratch with google_benchmark: write benchmarks with arguments, fixtures, and integrate with CodSpeed for continuous performance testing.

How to Benchmark Java with JMH

Learn benchmarking from scratch with JMH: project setup with Maven and Gradle, parameterized benchmarks, JVM pitfalls, profilers, and CodSpeed CI integration.

How to Benchmark Go with the testing Package

Learn benchmarking from scratch with Go’s standard library: sub-benchmarks, parallel benchmarks, benchstat, pprof profiling, and CodSpeed CI integration.

Specialized Guides

Guides organized by topic, covering benchmarking strategies, API testing, database performance, and framework-specific integrations.

Benchmarking Strategy & Tools

Choosing the Right Python Benchmarking Strategy

Compare different Python benchmarking approaches—from command-line tools like time and hyperfine to integrated frameworks like timeit and pytest-codspeed.

API Performance Testing

Benchmarking a Go Gin API

Build a Gin HTTP API, write clean benchmarks for all routes, optimize measurement accuracy, and catch performance regressions in CI with flamegraph analysis.

Database Performance Testing

Advanced tutorials for benchmarking applications with database interactions, including setup strategies and CI integration.

NestJS + MongoDB with Vitest

Benchmark a NestJS API with MongoDB using Vitest benchmarks. Includes Docker and testcontainers setup patterns.

NestJS + MongoDB with tinybench

Alternative approach using tinybench for MongoDB performance testing in Node.js applications.