Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance testing #202

Merged
merged 19 commits into from
Dec 22, 2022
Merged

Add performance testing #202

merged 19 commits into from
Dec 22, 2022

Conversation

mciszczon
Copy link
Collaborator

@mciszczon mciszczon commented Dec 22, 2022

This PR introduces a basic set of performance tests (achieved with pytest-benchmark), as well as a Github Actions integration to make it easier to work with the performance testing, as well as control any unwanted degradation of the performance.

Implemented changes

  • Added pre-commit hook configuration, to automatically run black on commit.
  • Installed pytest-benchmark library to handle benchmarking.
  • Added tests/performance/* directory, which contains all the performance tests, related dataclasses and fixtures.
  • Configure dpytest to run performance tests and ensure valid output.
  • Added benchmark-action/github-action-benchmark@v1 Github Action that runs performance tests, adds comments with the results and can even fail a CI run if the performance has significantly worsened.
  • A new performance page will be generated, with history of commits to show how performance changed over time. It will be available at https://konradhalas.github.io/dacite/performance/X.Y, where X.Y is the related Python version from Github Actions matrix (e.g. 3.11).

Suggested actions

Before accepting and merging this PR, it is recommended to:

  1. Create an empty gh-pages branch in konradhalas/dacite repo.
  2. A personal Github Token should be generated, and added to the repository Secrets with the GITHUB_TOKEN key. The token must have the following permissions:
    • Access to konradhalas/dacite repo.
    • Actions: Read and write access.
    • Pull requests: Read and write access.
    • Contents: Read and write access

@konradhalas konradhalas merged commit a86ef20 into konradhalas:master Dec 22, 2022
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.

2 participants