aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/benchmark
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/testing/benchmark
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
downloadydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/benchmark')
-rw-r--r--library/cpp/testing/benchmark/bench.cpp22
-rw-r--r--library/cpp/testing/benchmark/bench.h10
2 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/testing/benchmark/bench.cpp b/library/cpp/testing/benchmark/bench.cpp
index 24299e6b12..08d8708005 100644
--- a/library/cpp/testing/benchmark/bench.cpp
+++ b/library/cpp/testing/benchmark/bench.cpp
@@ -73,7 +73,7 @@ namespace {
const TStringBuf N;
};
- inline TString DoFmtTime(double t) {
+ inline TString DoFmtTime(double t) {
if (t > 0.1) {
return ToString(t) + " seconds";
}
@@ -173,7 +173,7 @@ namespace {
}
};
- TLinFunc CalcModel(const TSamples& s) {
+ TLinFunc CalcModel(const TSamples& s) {
TKahanSLRSolver solver;
for (const auto& p : s) {
@@ -188,7 +188,7 @@ namespace {
return TLinFunc{c, i};
}
- inline TSamples RemoveOutliers(const TSamples& s, double fraction) {
+ inline TSamples RemoveOutliers(const TSamples& s, double fraction) {
if (s.size() < 20) {
return s;
}
@@ -263,7 +263,7 @@ namespace {
using TTests = TIntrusiveListWithAutoDelete<ITestRunner, TDestructor>;
- inline TTests& Tests() {
+ inline TTests& Tests() {
return *Singleton<TTests>();
}
@@ -285,7 +285,7 @@ namespace {
F_JSON /* "json" */
};
- TAdaptiveLock STDOUT_LOCK;
+ TAdaptiveLock STDOUT_LOCK;
struct IReporter {
virtual void Report(TResult&& result) = 0;
@@ -420,7 +420,7 @@ namespace {
TAdaptiveLock ResultsLock_;
};
- THolder<IReporter> MakeReporter(const EOutFormat type) {
+ THolder<IReporter> MakeReporter(const EOutFormat type) {
switch (type) {
case F_CONSOLE:
return MakeHolder<TConsoleReporter>();
@@ -438,11 +438,11 @@ namespace {
return MakeHolder<TConsoleReporter>(); // make compiler happy
}
- THolder<IReporter> MakeOrderedReporter(const EOutFormat type) {
+ THolder<IReporter> MakeOrderedReporter(const EOutFormat type) {
return MakeHolder<TOrderedReporter>(MakeReporter(type));
}
- void EnumerateTests(TVector<ITestRunner*>& tests) {
+ void EnumerateTests(TVector<ITestRunner*>& tests) {
for (size_t id : xrange(tests.size())) {
tests[id]->SequentialId = id;
}
@@ -453,11 +453,11 @@ template <>
EOutFormat FromStringImpl<EOutFormat>(const char* data, size_t len) {
const auto s = TStringBuf{data, len};
- if (TStringBuf("console") == s) {
+ if (TStringBuf("console") == s) {
return F_CONSOLE;
- } else if (TStringBuf("csv") == s) {
+ } else if (TStringBuf("csv") == s) {
return F_CSV;
- } else if (TStringBuf("json") == s) {
+ } else if (TStringBuf("json") == s) {
return F_JSON;
}
diff --git a/library/cpp/testing/benchmark/bench.h b/library/cpp/testing/benchmark/bench.h
index d2fab33709..21551ad0dd 100644
--- a/library/cpp/testing/benchmark/bench.h
+++ b/library/cpp/testing/benchmark/bench.h
@@ -84,9 +84,9 @@ namespace NBench {
int Main(int argc, char** argv);
}
-#define Y_CPU_BENCHMARK(name, cnt) \
- namespace N_bench_##name { \
- static void Run(::NBench::NCpu::TParams&); \
- const ::NBench::NCpu::TRegistar benchmark(#name, &Run); \
- } \
+#define Y_CPU_BENCHMARK(name, cnt) \
+ namespace N_bench_##name { \
+ static void Run(::NBench::NCpu::TParams&); \
+ const ::NBench::NCpu::TRegistar benchmark(#name, &Run); \
+ } \
static void N_bench_##name::Run(::NBench::NCpu::TParams& cnt)