diff --git a/include/xrpl/beast/core/FunctionProfiler.h b/include/xrpl/beast/core/FunctionProfiler.h index 179f31ec0b..d6c1b09740 100644 --- a/include/xrpl/beast/core/FunctionProfiler.h +++ b/include/xrpl/beast/core/FunctionProfiler.h @@ -19,7 +19,7 @@ class FunctionProfiler public: inline static std::unordered_map funcionDurations; - FunctionProfiler(std::source_location location = std::source_location::current()): functionName(location.function_name()), start(std::chrono::steady_clock::now()) + FunctionProfiler(const std::string& tag, std::source_location location = std::source_location::current()): functionName(location.function_name() + tag), start(std::chrono::steady_clock::now()) { } diff --git a/include/xrpl/beast/hash/xxhasher.h b/include/xrpl/beast/hash/xxhasher.h index 695bcf6d03..4507b3efda 100644 --- a/include/xrpl/beast/hash/xxhasher.h +++ b/include/xrpl/beast/hash/xxhasher.h @@ -89,14 +89,14 @@ public: void operator()(void const* key, std::size_t len) noexcept { - FunctionProfiler _; + FunctionProfiler _{"-size-" + std::to_string(len)}; XXH3_64bits_update(state_, key, len); } explicit operator std::size_t() noexcept { - FunctionProfiler _; + FunctionProfiler _{"-digest"}; return XXH3_64bits_digest(state_); } };