summaryrefslogtreecommitdiffstats
path: root/util/system/benchmark/create_destroy_thread/main.cpp
diff options
context:
space:
mode:
authoryazevnul <[email protected]>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/system/benchmark/create_destroy_thread/main.cpp
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/system/benchmark/create_destroy_thread/main.cpp')
-rw-r--r--util/system/benchmark/create_destroy_thread/main.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/util/system/benchmark/create_destroy_thread/main.cpp b/util/system/benchmark/create_destroy_thread/main.cpp
index 8f9f5c9850d..0ca2a9d96f3 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();
+ }
+}