15 #include "benchmark/benchmark.h" 22 void BM_SafeCurrentThreadIdentity(benchmark::State& state) {
23 for (
auto _ : state) {
24 benchmark::DoNotOptimize(
28 BENCHMARK(BM_SafeCurrentThreadIdentity);
30 void BM_UnsafeCurrentThreadIdentity(benchmark::State& state) {
31 for (
auto _ : state) {
32 benchmark::DoNotOptimize(
36 BENCHMARK(BM_UnsafeCurrentThreadIdentity);
base_internal::ThreadIdentity * GetOrCreateCurrentThreadIdentity()
ThreadIdentity * CurrentThreadIdentityIfPresent()