mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-29 01:50:43 +00:00
feat: Dump metric values after test run
This commit is contained in:
@@ -134,7 +134,7 @@ runEscrowWasm(
|
||||
|
||||
hfs.executionTimeEvent("runEscrowWasm")
|
||||
.notify(
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - start));
|
||||
|
||||
if (!ret)
|
||||
@@ -169,7 +169,7 @@ preflightEscrowWasm(
|
||||
|
||||
hfs.executionTimeEvent("preflightEscrowWasm")
|
||||
.notify(
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - start));
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -38,7 +38,10 @@ struct RecordingEventImpl : public beast::insight::EventImpl
|
||||
|
||||
~RecordingEventImpl() override
|
||||
{
|
||||
std::cout << "Mean (ns): " << meanNs() << "\n";
|
||||
if (count > 0)
|
||||
{
|
||||
std::cout << "Mean (ms): " << meanMs() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -53,7 +56,7 @@ struct RecordingEventImpl : public beast::insight::EventImpl
|
||||
}
|
||||
|
||||
[[nodiscard]] double
|
||||
meanNs() const
|
||||
meanMs() const
|
||||
{
|
||||
return count != 0 ? static_cast<double>(total.count()) / static_cast<double>(count) : 0.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user