mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Performance logging and counters:
* Tally and duration counters for Job Queue tasks and RPC calls
optionally rendered by server_info and server_state, and
optionally printed to a distinct log file.
- Tally each Job Queue task as it is queued, starts, and
finishes running. Track total duration queued and running.
- Tally each RPC call as it starts and either finishes
successfully or throws an exception. Track total running
duration for each.
* Track currently executing Job Queue tasks and RPC methods
along with durations.
* Json-formatted performance log file written by a dedicated
thread, for above-described data.
* New optional parameter, "counters", for server_info and
server_state. If set, render Job Queue and RPC call counters
as well as currently executing tasks.
* New configuration section, "[perf]", to optionally control
performance logging to a file.
* Support optional sub-second periods when rendering human-readable
time points.
This commit is contained in:
committed by
Nikolaos D. Bougalis
parent
ef3bc92b82
commit
8eb8c77886
@@ -1013,6 +1013,15 @@ private:
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
// server_info [counters]
|
||||
Json::Value parseServerInfo (Json::Value const& jvParams)
|
||||
{
|
||||
Json::Value jvRequest (Json::objectValue);
|
||||
if (jvParams.size() == 1 && jvParams[0u].asString() == "counters")
|
||||
jvRequest[jss::counters] = true;
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -1088,8 +1097,8 @@ public:
|
||||
{ "sign_for", &RPCParser::parseSignFor, 3, 4 },
|
||||
{ "submit", &RPCParser::parseSignSubmit, 1, 3 },
|
||||
{ "submit_multisigned", &RPCParser::parseSubmitMultiSigned, 1, 1 },
|
||||
{ "server_info", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "server_state", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "server_info", &RPCParser::parseServerInfo, 0, 1 },
|
||||
{ "server_state", &RPCParser::parseServerInfo, 0, 1 },
|
||||
{ "stop", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "transaction_entry", &RPCParser::parseTransactionEntry, 2, 2 },
|
||||
{ "tx", &RPCParser::parseTx, 1, 2 },
|
||||
|
||||
Reference in New Issue
Block a user