facebook / facebook/folly

Support invoking a benchmark by name.

Open
#1,869 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

Say I have:

```
BENCHMARK(Q1) {
// blah
}

BENCHMARK(Q2) {
// blah
}

BENCHMARK(Q3) {
// blah
}

int main() {
// In my main, I'd like pass arguments to control which benchmark to run

for (auto name: FLAG_benchmark_to_run) {
FOLLY_INVOKE_BENCHMARK_BY_NAME(name);
}
}
```

For example, how do I support:
```
# This skips Q2
./my_benchmark --benchmark_to_run=Q1,Q3
```

Is there anything like `FOLLY_INVOKE_BENCHMARK_BY_NAME` available?

Contributor guide

Open the contributing guide

Research direction

The issue does not name any source files or tests. Start by locating the existing BENCHMARK registration and invocation entry points, then determine how named selection and comma-separated command-line values should work; done means Q1 and Q3 run while Q2 is skipped for the shown example.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.