summaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/unistd_benchmark.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/benchmarks/unistd_benchmark.cpp b/benchmarks/unistd_benchmark.cpp
index e839bf8..12b788a 100644
--- a/benchmarks/unistd_benchmark.cpp
+++ b/benchmarks/unistd_benchmark.cpp
@@ -28,3 +28,14 @@ static void BM_unistd_getpid(int iters) {
StopBenchmarkTiming();
}
BENCHMARK(BM_unistd_getpid);
+
+static void BM_unistd_gettid(int iters) {
+ StartBenchmarkTiming();
+
+ for (int i = 0; i < iters; ++i) {
+ gettid();
+ }
+
+ StopBenchmarkTiming();
+}
+BENCHMARK(BM_unistd_gettid);