Skip to content

Conversation

@avalanche-staging
Copy link

Summary

This PR integrates CodSpeed continuous performance benchmarking into the go-rest-api project. CodSpeed provides accurate, reproducible performance measurements in CI environments by using specialized instrumentation to isolate performance data from environmental noise.

Changes Made

  • Created comprehensive Go benchmark files for key components:

    • Album service operations (CRUD, query, count, validation)
    • Authentication service (login, user context management)
    • Logging utilities (context-aware logging operations)
    • Pagination utilities (page creation, link building)
  • Added GitHub Actions workflow for CodSpeed:

    • Configured to run on push to master and on pull requests
    • Uses latest CodSpeed action (v4.4.1)
    • Includes OIDC authentication for secure integration
    • Runs all benchmarks across the codebase

Benchmark Coverage

The benchmarks cover critical performance paths including:

  • RESTful API service layer operations
  • JWT authentication and token generation
  • Structured logging with contextual information
  • Pagination and link header generation
  • Input validation

Next Steps

To complete the CodSpeed integration:

  1. Merge this pull request to your repository
  2. Install the CodSpeed GitHub App from the GitHub Marketplace
  3. Link your repository to your CodSpeed account
  4. The workflow will automatically run on future commits and pull requests
  5. View performance reports and flame graphs on the CodSpeed dashboard

Testing

The benchmarks follow Go's standard testing patterns and can be run locally with:

go test -bench=. -benchmem ./...

Documentation

For more information about CodSpeed:

This commit adds comprehensive performance benchmarking support using CodSpeed:

- Add benchmark files for album, auth, logging, and pagination packages
- Configure GitHub Actions workflow for automated benchmark execution
- Use CodSpeed action v4.4.1 with OIDC authentication
- Enable continuous performance monitoring for all key components

The benchmarks cover critical performance paths including service operations,
authentication, logging, and pagination utilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant