Skip to content

Support setup/teardown functions #78

Open
@seddonym

Description

@seddonym

I have some code I'd like to benchmark on codspeed which requires custom setup before each iteration. (If you're interested, it's testing the performance of a partially-populated cache which will get fully populated on each iteration, so I need to reset it to a partial state.)

pytest-benchmark supports this via a setup callback in its pedantic mode. It would be great if there was some way of achieving this using codspeed. (Might as well support teardown too.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions