[FR] Ability to register flags for custom Reporters
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
Línea de trabajo
Empieza leyendo los puntos de entrada existentes benchmark::Initialize, benchmark::RunSpecifiedBenchmarks y BenchmarkReporter, junto con la forma en que los flags de línea de comandos seleccionan los reporters integrados. Define cómo se almacenan, seleccionan y construyen los reporters personalizados registrados y, a continuación, verifica que se pueda elegir un reporter personalizado mediante un flag sin pasarlo explícitamente a RunSpecifiedBenchmarks.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
If I create a custom BenchmarkReporter, I also have to instantiate it and pass it to the RunSpecifiedBenchmarks function.
int main(int argc, char** argv) {
benchmark::Initialize(&argc, argv);
BenchmarkReporter* reporter = new FooReporter();
benchmark::RunSpecifiedBenchmarks(&reporter);
benchmark::Shutdown();
}
Describe the solution you'd like
I would like to be able to easily configure a flag for my reporter such as --benchmark_format=foo.
int main(int argc, char** argv) {
benchmark::Initialize(&argc, argv);
benchmark::RegisterReporter("foo", [](){ return new FooReporter()})
benchmark::RunSpecifiedBenchmarks();
benchmark::Shutdown();
}
Describe alternatives you've considered
- I currently proxy to the default reporter while intercepting the Run results in my custom reporter, so mine always runs on top of the default behavior.
- have considered adding arg parsing to
main()but that is more convoluted.
Additional context
- I am interested in adding a custom reporter that asserts that the run results fall within some target performance threshold. I want to be able to optionally select this reporter at runtime with a flag. Built in support for assertions on a given threshold would be a welcome alternative.
- side note: it would be great to have an overload for
::benchmark::BenchmarkReporter::Run::GetAdjustedRealTime()that accepts a time unit.
- Lenguaje dominante
- C++
- Estrellas
- 10.5k
- Forks
- 1.8k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/benchmark
-
[BUG] Confusing title in docs/platform_specific_build_instructions.mdPosiblemente ocupada @skryabae la tomó hace 30 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[BUG] Memory manager counts allocations not part of benchmarkQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
google/benchmark#2149 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
[FR] Add native Zig bindings via top-level `bindings/zig`Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
google/benchmark#2266 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
google/benchmark#2235 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
google/benchmark#2195 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de google/benchmark
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
arvidn/libtorrent#9149 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Niko1221/Strata#5560 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
NVIDIA windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするAbierto要トリアージ 辞書
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
yksr-melt/Meltype#1625 · 1 reacción ·
Los mantenedores suelen responder en 1 día