MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / stopRecord

Method stopRecord

include/common/timer.h:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 void stopRecord(const TimerTag TT) noexcept {
44 assuming(TT < TimerTag::Max);
45 std::unique_lock Lock(Mutex);
46 const uint32_t Index = static_cast<uint32_t>(TT);
47 auto &Map = StartTime[Index];
48 if (auto Iter = Map.find(std::this_thread::get_id()); Iter != Map.end()) {
49 const auto Diff = Clock::now() - Iter->second;
50 RecTime[Index] += Diff;
51 Map.erase(Iter);
52 }
53 }
54
55 void clearRecord(const TimerTag TT) noexcept {
56 assuming(TT < TimerTag::Max);

Callers 2

stopRecordWasmMethod · 0.80
stopRecordHostMethod · 0.80

Calls 4

nowClass · 0.85
eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected