mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
General tidy and refactoring:
* Use nullptr (C++11) instead of NULL. * Put each file into its own namespace declaration. * Remove "using namespace" directives and add scope qualifiers. * Control when beast's implementation of std::equal (C++14) is used. * Tidy up some const declarations. Conflicts: src/ripple_app/shamap/SHAMapSync.cpp src/ripple_app/tx/TransactionEngine.cpp
This commit is contained in:
committed by
Vinnie Falco
parent
c581ffb8a4
commit
cad50c68a8
@@ -138,7 +138,7 @@ std::string LoadMonitor::printElapsed (double seconds)
|
||||
void LoadMonitor::addLoadSample (LoadEvent const& sample)
|
||||
{
|
||||
std::string const& name (sample.name());
|
||||
RelativeTime const latency (sample.getSecondsTotal());
|
||||
beast::RelativeTime const latency (sample.getSecondsTotal());
|
||||
|
||||
if (latency.inSeconds() > 0.5)
|
||||
{
|
||||
@@ -167,13 +167,13 @@ void LoadMonitor::addLoadSample (LoadEvent const& sample)
|
||||
mLatencyMSPeak = latencyPeak;
|
||||
}
|
||||
|
||||
void LoadMonitor::setTargetLatency (uint64 avg, uint64 pk)
|
||||
void LoadMonitor::setTargetLatency (beast::uint64 avg, beast::uint64 pk)
|
||||
{
|
||||
mTargetLatencyAvg = avg;
|
||||
mTargetLatencyPk = pk;
|
||||
}
|
||||
|
||||
bool LoadMonitor::isOverTarget (uint64 avg, uint64 peak)
|
||||
bool LoadMonitor::isOverTarget (beast::uint64 avg, beast::uint64 peak)
|
||||
{
|
||||
return (mTargetLatencyPk && (peak > mTargetLatencyPk)) ||
|
||||
(mTargetLatencyAvg && (avg > mTargetLatencyAvg));
|
||||
|
||||
Reference in New Issue
Block a user