main.cpp 460 B

12345678910111213141516
  1. #include <benchmark/benchmark.h>
  2. #include <library/cpp/testing/hook/hook.h>
  3. #include <util/generic/scope.h>
  4. int main(int argc, char** argv) {
  5. NTesting::THook::CallBeforeInit();
  6. ::benchmark::Initialize(&argc, argv);
  7. if (::benchmark::ReportUnrecognizedArguments(argc, argv)) {
  8. return 1;
  9. }
  10. NTesting::THook::CallBeforeRun();
  11. Y_DEFER { NTesting::THook::CallAfterRun(); };
  12. ::benchmark::RunSpecifiedBenchmarks();
  13. return 0;
  14. }