diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /library/cpp/testing/gbenchmark_main/main.cpp | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'library/cpp/testing/gbenchmark_main/main.cpp')
-rw-r--r-- | library/cpp/testing/gbenchmark_main/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/cpp/testing/gbenchmark_main/main.cpp b/library/cpp/testing/gbenchmark_main/main.cpp new file mode 100644 index 0000000000..523d18901a --- /dev/null +++ b/library/cpp/testing/gbenchmark_main/main.cpp @@ -0,0 +1,16 @@ +#include <benchmark/benchmark.h> + +#include <library/cpp/testing/hook/hook.h> +#include <util/generic/scope.h> + +int main(int argc, char** argv) { + NTesting::THook::CallBeforeInit(); + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) { + return 1; + } + NTesting::THook::CallBeforeRun(); + Y_DEFER { NTesting::THook::CallAfterRun(); }; + ::benchmark::RunSpecifiedBenchmarks(); + return 0; +} |