summaryrefslogtreecommitdiffstats
path: root/util/system/benchmark/create_destroy_thread/main.cpp
diff options
context:
space:
mode:
authoryazevnul <[email protected]>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/system/benchmark/create_destroy_thread/main.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 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 0ca2a9d96f3..8f9f5c9850d 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();
+ }
+}