summaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/gbenchmark/main.cpp
blob: bdb254cda66c428ec97e8a9e3926ebf84e72c375 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <benchmark/benchmark.h>

#include <library/cpp/testing/hook/hook.h>
#include <library/cpp/testing/hook/yt_initialize_hook.h>
#include <util/generic/scope.h>

int main(int argc, char** argv) {
    ::benchmark::MaybeReenterWithoutASLR(argc, argv);
    InitializeYt(argc, 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();
    ::benchmark::Shutdown();
    return 0;
}