google / google/benchmark

[FR] global setup and teardown

Open
#1,873 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
I have benchmarks that need to create files. The benchmark is run multiple times to establish timing. But it's expensive and pointless to create and delete the files for each repetition.

**Describe the solution you'd like**
I expected setup to run once at the beginning and teardown to run once at the end. If that's not feasible then it would be good to have a real "global" setup/teardown that doesn't get run for each repetition.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.