mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-22 04:35:50 +00:00
add avg extract time
This commit is contained in:
@@ -372,11 +372,17 @@ ReportingETL::runETLPipeline(uint32_t startSequence, int numExtractors)
|
|||||||
queues.push_back(transformQueue);
|
queues.push_back(transformQueue);
|
||||||
std::cout << "added to queues";
|
std::cout << "added to queues";
|
||||||
|
|
||||||
threads.emplace_back(
|
threads.emplace_back([this,
|
||||||
[this, &startSequence, &writeConflict, transformQueue, i, numExtractors]() {
|
&startSequence,
|
||||||
|
&writeConflict,
|
||||||
|
transformQueue,
|
||||||
|
i,
|
||||||
|
numExtractors]() {
|
||||||
beast::setCurrentThreadName("rippled: ReportingETL extract");
|
beast::setCurrentThreadName("rippled: ReportingETL extract");
|
||||||
uint32_t currentSequence = startSequence + i;
|
uint32_t currentSequence = startSequence + i;
|
||||||
|
|
||||||
|
double totalTime = 0;
|
||||||
|
|
||||||
// there are two stopping conditions here.
|
// there are two stopping conditions here.
|
||||||
// First, if there is a write conflict in the load thread, the
|
// First, if there is a write conflict in the load thread, the
|
||||||
// ETL mechanism should stop. The other stopping condition is if
|
// ETL mechanism should stop. The other stopping condition is if
|
||||||
@@ -392,12 +398,17 @@ ReportingETL::runETLPipeline(uint32_t startSequence, int numExtractors)
|
|||||||
auto end = std::chrono::system_clock::now();
|
auto end = std::chrono::system_clock::now();
|
||||||
|
|
||||||
auto time = ((end - start).count()) / 1000000000.0;
|
auto time = ((end - start).count()) / 1000000000.0;
|
||||||
|
totalTime += time;
|
||||||
|
|
||||||
auto tps =
|
auto tps =
|
||||||
fetchResponse->transactions_list().transactions_size() /
|
fetchResponse->transactions_list().transactions_size() /
|
||||||
time;
|
time;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "Extract phase time = " << time
|
BOOST_LOG_TRIVIAL(info)
|
||||||
|
<< "Extract phase time = " << time
|
||||||
<< " . Extract phase tps = " << tps
|
<< " . Extract phase tps = " << tps
|
||||||
|
<< " . Avg extract time = "
|
||||||
|
<< totalTime / (currentSequence - startSequence + 1)
|
||||||
<< " . thread num = " << i
|
<< " . thread num = " << i
|
||||||
<< " . seq = " << currentSequence;
|
<< " . seq = " << currentSequence;
|
||||||
// if the fetch is unsuccessful, stop. fetchLedger only
|
// if the fetch is unsuccessful, stop. fetchLedger only
|
||||||
|
|||||||
Reference in New Issue
Block a user