| 1166 | thread_local uint64_t threadId = 0; |
| 1167 | |
| 1168 | uint64_t getTraceThreadId() { |
| 1169 | while (threadId == 0) { |
| 1170 | threadId = deterministicRandom()->randomUInt64(); |
| 1171 | } |
| 1172 | |
| 1173 | return threadId; |
| 1174 | } |
| 1175 | |
| 1176 | void BaseTraceEvent::setThreadId() { |
| 1177 | this->detail("ThreadID", getTraceThreadId()); |
no test coverage detected