mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 17:27:00 +00:00
Add cpu counter
This commit is contained in:
@@ -82,7 +82,7 @@ getProfilingResults()
|
||||
times.reserve(duration.time.size());
|
||||
|
||||
std::transform(std::begin(duration.time), std::end(duration.time), std::back_inserter(times), [](std::int64_t a, const std::chrono::nanoseconds& time) {
|
||||
return time.count();
|
||||
return static_cast<std::int64_t>(time.count());
|
||||
});
|
||||
|
||||
auto timeInTotal = std::accumulate(std::begin(times), std::end(times), std::int64_t{0});
|
||||
|
||||
@@ -149,12 +149,6 @@ public:
|
||||
// auto ret = XXH3_64bits_digest(wrapper.state);
|
||||
duration_ += std::chrono::steady_clock::now() - start;
|
||||
|
||||
if (FunctionProfiler::funcionDurations
|
||||
["xxhasher-" + std::to_string(totalSize_)]
|
||||
.count == std::numeric_limits<std::int64_t>::max())
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
std::lock_guard<std::mutex> lock{FunctionProfiler::mutex_};
|
||||
FunctionProfiler::funcionDurations
|
||||
["xxhasher-" + std::to_string(totalSize_)]
|
||||
|
||||
Reference in New Issue
Block a user