mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Set ColumnLimit to 120 in clang-format (#6288)
This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
This commit is contained in:
@@ -35,8 +35,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
ledgerLog(prefix + "_ledger.csv", std::ofstream::app);
|
||||
|
||||
// title
|
||||
log << prefix << "(" << numPeers << "," << delay.count() << ")"
|
||||
<< std::endl;
|
||||
log << prefix << "(" << numPeers << "," << delay.count() << ")" << std::endl;
|
||||
|
||||
// number of peers, UNLs, connections
|
||||
BEAST_EXPECT(numPeers >= 1);
|
||||
@@ -68,11 +67,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
HeartbeatTimer heart(sim.scheduler);
|
||||
|
||||
// txs, start/stop/step, target
|
||||
auto peerSelector = makeSelector(
|
||||
peers.begin(),
|
||||
peers.end(),
|
||||
std::vector<double>(numPeers, 1.),
|
||||
sim.rng);
|
||||
auto peerSelector = makeSelector(peers.begin(), peers.end(), std::vector<double>(numPeers, 1.), sim.rng);
|
||||
auto txSubmitter = makeSubmitter(
|
||||
ConstantDistribution{rate.inv()},
|
||||
sim.scheduler.now() + quiet,
|
||||
@@ -90,11 +85,9 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
|
||||
log << std::right;
|
||||
log << "| Peers: " << std::setw(2) << peers.size();
|
||||
log << " | Duration: " << std::setw(6)
|
||||
<< duration_cast<milliseconds>(simDuration).count() << " ms";
|
||||
log << " | Duration: " << std::setw(6) << duration_cast<milliseconds>(simDuration).count() << " ms";
|
||||
log << " | Branches: " << std::setw(1) << sim.branches();
|
||||
log << " | Synchronized: " << std::setw(1)
|
||||
<< (sim.synchronized() ? "Y" : "N");
|
||||
log << " | Synchronized: " << std::setw(1) << (sim.synchronized() ? "Y" : "N");
|
||||
log << " |" << std::endl;
|
||||
|
||||
txCollector.report(simDuration, log, true);
|
||||
@@ -124,8 +117,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
ledgerLog(prefix + "_ledger.csv", std::ofstream::app);
|
||||
|
||||
// title
|
||||
log << prefix << "(" << numPeers << "," << delay.count() << ")"
|
||||
<< std::endl;
|
||||
log << prefix << "(" << numPeers << "," << delay.count() << ")" << std::endl;
|
||||
|
||||
// number of peers, UNLs, connections
|
||||
int const numCNLs = std::max(int(1.00 * numPeers), 1);
|
||||
@@ -133,9 +125,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
int const maxCNLSize = std::max(int(0.50 * numCNLs), 1);
|
||||
BEAST_EXPECT(numPeers >= 1);
|
||||
BEAST_EXPECT(numCNLs >= 1);
|
||||
BEAST_EXPECT(
|
||||
1 <= minCNLSize && minCNLSize <= maxCNLSize &&
|
||||
maxCNLSize <= numPeers);
|
||||
BEAST_EXPECT(1 <= minCNLSize && minCNLSize <= maxCNLSize && maxCNLSize <= numPeers);
|
||||
|
||||
Sim sim;
|
||||
PeerGroup peers = sim.createGroup(numPeers);
|
||||
@@ -144,15 +134,9 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
peers.trust(peers);
|
||||
|
||||
// scale-free connect graph with fixed delay
|
||||
std::vector<double> const ranks =
|
||||
sample(peers.size(), PowerLawDistribution{1, 3}, sim.rng);
|
||||
std::vector<double> const ranks = sample(peers.size(), PowerLawDistribution{1, 3}, sim.rng);
|
||||
randomRankedConnect(
|
||||
peers,
|
||||
ranks,
|
||||
numCNLs,
|
||||
std::uniform_int_distribution<>{minCNLSize, maxCNLSize},
|
||||
sim.rng,
|
||||
delay);
|
||||
peers, ranks, numCNLs, std::uniform_int_distribution<>{minCNLSize, maxCNLSize}, sim.rng, delay);
|
||||
|
||||
// Initialize collectors to track statistics to report
|
||||
TxCollector txCollector;
|
||||
@@ -172,11 +156,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
HeartbeatTimer heart(sim.scheduler);
|
||||
|
||||
// txs, start/stop/step, target
|
||||
auto peerSelector = makeSelector(
|
||||
peers.begin(),
|
||||
peers.end(),
|
||||
std::vector<double>(numPeers, 1.),
|
||||
sim.rng);
|
||||
auto peerSelector = makeSelector(peers.begin(), peers.end(), std::vector<double>(numPeers, 1.), sim.rng);
|
||||
auto txSubmitter = makeSubmitter(
|
||||
ConstantDistribution{rate.inv()},
|
||||
sim.scheduler.now() + quiet,
|
||||
@@ -194,11 +174,9 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
|
||||
log << std::right;
|
||||
log << "| Peers: " << std::setw(2) << peers.size();
|
||||
log << " | Duration: " << std::setw(6)
|
||||
<< duration_cast<milliseconds>(simDuration).count() << " ms";
|
||||
log << " | Duration: " << std::setw(6) << duration_cast<milliseconds>(simDuration).count() << " ms";
|
||||
log << " | Branches: " << std::setw(1) << sim.branches();
|
||||
log << " | Synchronized: " << std::setw(1)
|
||||
<< (sim.synchronized() ? "Y" : "N");
|
||||
log << " | Synchronized: " << std::setw(1) << (sim.synchronized() ? "Y" : "N");
|
||||
log << " |" << std::endl;
|
||||
|
||||
txCollector.report(simDuration, log, true);
|
||||
@@ -225,8 +203,7 @@ class DistributedValidators_test : public beast::unit_test::suite
|
||||
|
||||
std::chrono::milliseconds const delay(delayCount);
|
||||
|
||||
log << "DistributedValidators: 1 to " << maxNumValidators << " Peers"
|
||||
<< std::endl;
|
||||
log << "DistributedValidators: 1 to " << maxNumValidators << " Peers" << std::endl;
|
||||
|
||||
/**
|
||||
* Simulate with N = 1 to N
|
||||
|
||||
Reference in New Issue
Block a user