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:
Mark Travis
2018-01-13 04:02:43 -08:00
committed by Nikolaos D. Bougalis
parent ef3bc92b82
commit 8eb8c77886
45 changed files with 10379 additions and 577 deletions

View File

@@ -146,7 +146,7 @@ public:
// Connected trust and network graphs with single fixed delay
peers.trustAndConnect(
peers, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
peers, date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
// everyone submits their own ID as a TX
for (Peer * p : peers)
@@ -194,10 +194,11 @@ public:
// Fast and slow network connections
fast.connect(
fast, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
fast, date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
slow.connect(
network, round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
network,
date::round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
// All peers submit their own ID as a transaction
for (Peer* peer : network)
@@ -250,10 +251,12 @@ public:
// Fast and slow network connections
fast.connect(
fast, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
fast,
date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
slow.connect(
network, round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
network,
date::round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
for (Peer* peer : slow)
peer->runAsValidator = isParticipant;
@@ -377,7 +380,7 @@ public:
network.trust(network);
network.connect(
network, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
network, date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
// Run consensus without skew until we have a short close time
// resolution
@@ -447,7 +450,7 @@ public:
PeerGroup network = minority + majority;
SimDuration delay =
round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
minority.trustAndConnect(minority + majorityA, delay);
majority.trustAndConnect(majority, delay);
@@ -552,7 +555,8 @@ public:
PeerGroup network = loner + clique;
network.connect(
network, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
network,
date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
// initial round to set prior state
sim.run(1);
@@ -606,9 +610,10 @@ public:
// Fast and slow network connections
fast.connect(
fast, round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
fast, date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY));
slow.connect(
network, round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
network,
date::round<milliseconds>(1.1 * parms.ledgerGRANULARITY));
// Run to the ledger *prior* to decreasing the resolution
sim.run(increaseLedgerTimeResolutionEvery - 2);
@@ -757,7 +762,7 @@ public:
PeerGroup network = a + b;
SimDuration delay =
round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
a.trustAndConnect(a, delay);
b.trustAndConnect(b, delay);
@@ -804,7 +809,7 @@ public:
center.trust(validators);
SimDuration delay =
round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
date::round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
validators.connect(center, delay);
center[0]->runAsValidator = false;
@@ -928,8 +933,10 @@ public:
PeerGroup groupNotFastC = groupABD + groupCsplit;
PeerGroup network = groupABD + groupCsplit + groupCfast;
SimDuration delay = round<milliseconds>(0.2 * parms.ledgerGRANULARITY);
SimDuration fDelay = round<milliseconds>(0.1 * parms.ledgerGRANULARITY);
SimDuration delay = date::round<milliseconds>(
0.2 * parms.ledgerGRANULARITY);
SimDuration fDelay = date::round<milliseconds>(
0.1 * parms.ledgerGRANULARITY);
network.trust(network);
// C must have a shorter delay to see all the validations before the