MCPcopy Create free account
hub / github.com/apple/foundationdb / getTraceThreadId

Function getTraceThreadId

flow/Trace.cpp:1168–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

setThreadIdMethod · 0.85
setNetworkThreadMethod · 0.85
createDatabaseMethod · 0.85

Calls 2

deterministicRandomFunction · 0.85
randomUInt64Method · 0.80

Tested by

no test coverage detected