diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/system/benchmark | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/benchmark')
-rw-r--r-- | util/system/benchmark/cpu_id/main.cpp | 100 | ||||
-rw-r--r-- | util/system/benchmark/cpu_id/metrics/main.py | 8 | ||||
-rw-r--r-- | util/system/benchmark/cpu_id/metrics/ya.make | 26 | ||||
-rw-r--r-- | util/system/benchmark/cpu_id/ya.make | 20 | ||||
-rw-r--r-- | util/system/benchmark/create_destroy_thread/main.cpp | 50 | ||||
-rw-r--r-- | util/system/benchmark/create_destroy_thread/metrics/main.py | 8 | ||||
-rw-r--r-- | util/system/benchmark/create_destroy_thread/metrics/ya.make | 26 | ||||
-rw-r--r-- | util/system/benchmark/create_destroy_thread/ya.make | 14 | ||||
-rw-r--r-- | util/system/benchmark/ya.make | 20 |
9 files changed, 136 insertions, 136 deletions
diff --git a/util/system/benchmark/cpu_id/main.cpp b/util/system/benchmark/cpu_id/main.cpp index 8efe539983..11f29deda8 100644 --- a/util/system/benchmark/cpu_id/main.cpp +++ b/util/system/benchmark/cpu_id/main.cpp @@ -1,51 +1,51 @@ #include <library/cpp/testing/benchmark/bench.h> - -#include <util/system/cpu_id.h> - -#include <util/generic/xrange.h> - -#define DEFINE_BENCHMARK_PAIR(name) \ - Y_CPU_BENCHMARK(Have##name, iface) { \ - for (const auto i : xrange(iface.Iterations())) { \ - Y_UNUSED(i); \ - Y_DO_NOT_OPTIMIZE_AWAY(NX86::Have##name()); \ - } \ - } \ - \ - Y_CPU_BENCHMARK(CachedHave##name, iface) { \ - for (const auto i : xrange(iface.Iterations())) { \ - Y_UNUSED(i); \ - Y_DO_NOT_OPTIMIZE_AWAY(NX86::CachedHave##name()); \ - } \ - } - -DEFINE_BENCHMARK_PAIR(SSE) -DEFINE_BENCHMARK_PAIR(SSE2) -DEFINE_BENCHMARK_PAIR(SSE3) -DEFINE_BENCHMARK_PAIR(SSSE3) -DEFINE_BENCHMARK_PAIR(SSE41) -DEFINE_BENCHMARK_PAIR(SSE42) -DEFINE_BENCHMARK_PAIR(POPCNT) -DEFINE_BENCHMARK_PAIR(BMI1) -DEFINE_BENCHMARK_PAIR(AES) -DEFINE_BENCHMARK_PAIR(AVX) -DEFINE_BENCHMARK_PAIR(AVX2) -DEFINE_BENCHMARK_PAIR(AVX512F) -DEFINE_BENCHMARK_PAIR(AVX512DQ) -DEFINE_BENCHMARK_PAIR(AVX512IFMA) -DEFINE_BENCHMARK_PAIR(AVX512PF) -DEFINE_BENCHMARK_PAIR(AVX512ER) -DEFINE_BENCHMARK_PAIR(AVX512CD) -DEFINE_BENCHMARK_PAIR(AVX512BW) -DEFINE_BENCHMARK_PAIR(AVX512VL) -DEFINE_BENCHMARK_PAIR(AVX512VBMI) -DEFINE_BENCHMARK_PAIR(PREFETCHWT1) -DEFINE_BENCHMARK_PAIR(SHA) -DEFINE_BENCHMARK_PAIR(ADX) -DEFINE_BENCHMARK_PAIR(RDRAND) -DEFINE_BENCHMARK_PAIR(RDSEED) -DEFINE_BENCHMARK_PAIR(PCOMMIT) -DEFINE_BENCHMARK_PAIR(CLFLUSHOPT) -DEFINE_BENCHMARK_PAIR(CLWB) - -#undef DEFINE_BENCHMARK_PAIR + +#include <util/system/cpu_id.h> + +#include <util/generic/xrange.h> + +#define DEFINE_BENCHMARK_PAIR(name) \ + Y_CPU_BENCHMARK(Have##name, iface) { \ + for (const auto i : xrange(iface.Iterations())) { \ + Y_UNUSED(i); \ + Y_DO_NOT_OPTIMIZE_AWAY(NX86::Have##name()); \ + } \ + } \ + \ + Y_CPU_BENCHMARK(CachedHave##name, iface) { \ + for (const auto i : xrange(iface.Iterations())) { \ + Y_UNUSED(i); \ + Y_DO_NOT_OPTIMIZE_AWAY(NX86::CachedHave##name()); \ + } \ + } + +DEFINE_BENCHMARK_PAIR(SSE) +DEFINE_BENCHMARK_PAIR(SSE2) +DEFINE_BENCHMARK_PAIR(SSE3) +DEFINE_BENCHMARK_PAIR(SSSE3) +DEFINE_BENCHMARK_PAIR(SSE41) +DEFINE_BENCHMARK_PAIR(SSE42) +DEFINE_BENCHMARK_PAIR(POPCNT) +DEFINE_BENCHMARK_PAIR(BMI1) +DEFINE_BENCHMARK_PAIR(AES) +DEFINE_BENCHMARK_PAIR(AVX) +DEFINE_BENCHMARK_PAIR(AVX2) +DEFINE_BENCHMARK_PAIR(AVX512F) +DEFINE_BENCHMARK_PAIR(AVX512DQ) +DEFINE_BENCHMARK_PAIR(AVX512IFMA) +DEFINE_BENCHMARK_PAIR(AVX512PF) +DEFINE_BENCHMARK_PAIR(AVX512ER) +DEFINE_BENCHMARK_PAIR(AVX512CD) +DEFINE_BENCHMARK_PAIR(AVX512BW) +DEFINE_BENCHMARK_PAIR(AVX512VL) +DEFINE_BENCHMARK_PAIR(AVX512VBMI) +DEFINE_BENCHMARK_PAIR(PREFETCHWT1) +DEFINE_BENCHMARK_PAIR(SHA) +DEFINE_BENCHMARK_PAIR(ADX) +DEFINE_BENCHMARK_PAIR(RDRAND) +DEFINE_BENCHMARK_PAIR(RDSEED) +DEFINE_BENCHMARK_PAIR(PCOMMIT) +DEFINE_BENCHMARK_PAIR(CLFLUSHOPT) +DEFINE_BENCHMARK_PAIR(CLWB) + +#undef DEFINE_BENCHMARK_PAIR diff --git a/util/system/benchmark/cpu_id/metrics/main.py b/util/system/benchmark/cpu_id/metrics/main.py index d9a86e825c..80ce8193b3 100644 --- a/util/system/benchmark/cpu_id/metrics/main.py +++ b/util/system/benchmark/cpu_id/metrics/main.py @@ -1,5 +1,5 @@ -import yatest.common as yc - - -def test_export_metrics(metrics): +import yatest.common as yc + + +def test_export_metrics(metrics): metrics.set_benchmark(yc.execute_benchmark('util/system/benchmark/cpu_id/cpu_id', threads=8)) diff --git a/util/system/benchmark/cpu_id/metrics/ya.make b/util/system/benchmark/cpu_id/metrics/ya.make index 8c55def99b..46f950de28 100644 --- a/util/system/benchmark/cpu_id/metrics/ya.make +++ b/util/system/benchmark/cpu_id/metrics/ya.make @@ -1,21 +1,21 @@ -OWNER( - yazevnul +OWNER( + yazevnul g:util -) +) SUBSCRIBER(g:util-subscribers) - + PY2TEST() - + SIZE(LARGE) - -TAG( + +TAG( ya:force_sandbox - sb:intel_e5_2660v1 + sb:intel_e5_2660v1 ya:fat -) - +) + TEST_SRCS(main.py) - + DEPENDS(util/system/benchmark/cpu_id) - -END() + +END() diff --git a/util/system/benchmark/cpu_id/ya.make b/util/system/benchmark/cpu_id/ya.make index 976977014f..a475d0c67f 100644 --- a/util/system/benchmark/cpu_id/ya.make +++ b/util/system/benchmark/cpu_id/ya.make @@ -1,13 +1,13 @@ -OWNER( - yazevnul +OWNER( + yazevnul g:util -) +) SUBSCRIBER(g:util-subscribers) - + Y_BENCHMARK() - -SRCS( - main.cpp -) - -END() + +SRCS( + main.cpp +) + +END() diff --git a/util/system/benchmark/create_destroy_thread/main.cpp b/util/system/benchmark/create_destroy_thread/main.cpp index 0ca2a9d96f..8f9f5c9850 100644 --- a/util/system/benchmark/create_destroy_thread/main.cpp +++ b/util/system/benchmark/create_destroy_thread/main.cpp @@ -1,26 +1,26 @@ #include <library/cpp/testing/benchmark/bench.h> - -#include <util/system/thread.h> - -static void* DoNothing(void*) noexcept { - return nullptr; -} - -Y_CPU_BENCHMARK(CreateDestroyThread, iface) { - for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { - NBench::Clobber(); - TThread t(&DoNothing, nullptr); - Y_DO_NOT_OPTIMIZE_AWAY(t); - NBench::Clobber(); - } -} - -Y_CPU_BENCHMARK(CreateRunDestroyThread, iface) { - for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { - NBench::Clobber(); - TThread t(&DoNothing, nullptr); - t.Start(); - NBench::Escape(t.Join()); - NBench::Clobber(); - } -} + +#include <util/system/thread.h> + +static void* DoNothing(void*) noexcept { + return nullptr; +} + +Y_CPU_BENCHMARK(CreateDestroyThread, iface) { + for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { + NBench::Clobber(); + TThread t(&DoNothing, nullptr); + Y_DO_NOT_OPTIMIZE_AWAY(t); + NBench::Clobber(); + } +} + +Y_CPU_BENCHMARK(CreateRunDestroyThread, iface) { + for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { + NBench::Clobber(); + TThread t(&DoNothing, nullptr); + t.Start(); + NBench::Escape(t.Join()); + NBench::Clobber(); + } +} diff --git a/util/system/benchmark/create_destroy_thread/metrics/main.py b/util/system/benchmark/create_destroy_thread/metrics/main.py index 45564cda7f..3ee8f8a2ea 100644 --- a/util/system/benchmark/create_destroy_thread/metrics/main.py +++ b/util/system/benchmark/create_destroy_thread/metrics/main.py @@ -1,7 +1,7 @@ -import yatest.common as yc - - -def test_export_metrics(metrics): +import yatest.common as yc + + +def test_export_metrics(metrics): metrics.set_benchmark( yc.execute_benchmark('util/system/benchmark/create_destroy_thread/create_destroy_thread', threads=8) ) diff --git a/util/system/benchmark/create_destroy_thread/metrics/ya.make b/util/system/benchmark/create_destroy_thread/metrics/ya.make index d526487e1a..9498e47812 100644 --- a/util/system/benchmark/create_destroy_thread/metrics/ya.make +++ b/util/system/benchmark/create_destroy_thread/metrics/ya.make @@ -1,21 +1,21 @@ -OWNER( - yazevnul +OWNER( + yazevnul g:util -) +) SUBSCRIBER(g:util-subscribers) - + PY2TEST() - + SIZE(LARGE) - -TAG( + +TAG( ya:force_sandbox - sb:intel_e5_2660v1 + sb:intel_e5_2660v1 ya:fat -) - +) + TEST_SRCS(main.py) - + DEPENDS(util/system/benchmark/create_destroy_thread) - -END() + +END() diff --git a/util/system/benchmark/create_destroy_thread/ya.make b/util/system/benchmark/create_destroy_thread/ya.make index 03eb0ec8e0..c50840aaad 100644 --- a/util/system/benchmark/create_destroy_thread/ya.make +++ b/util/system/benchmark/create_destroy_thread/ya.make @@ -1,9 +1,9 @@ OWNER(yazevnul) - + Y_BENCHMARK() - -SRCS( - main.cpp -) - -END() + +SRCS( + main.cpp +) + +END() diff --git a/util/system/benchmark/ya.make b/util/system/benchmark/ya.make index 12fa9af9d6..262bc5b090 100644 --- a/util/system/benchmark/ya.make +++ b/util/system/benchmark/ya.make @@ -1,15 +1,15 @@ -OWNER( - yazevnul +OWNER( + yazevnul g:util -) +) SUBSCRIBER(g:util-subscribers) - -RECURSE( - cpu_id - cpu_id/metrics - create_destroy_thread - create_destroy_thread/metrics -) + +RECURSE( + cpu_id + cpu_id/metrics + create_destroy_thread + create_destroy_thread/metrics +) IF (NOT OS_WINDOWS) RECURSE( |