Skip to content

Commit 5b564f8

Browse files
authored
Fix total in workload stats (#17967)
1 parent 808e1b6 commit 5b564f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ydb/public/lib/ydb_cli/commands/ydb_workload.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato
268268

269269
int TWorkloadCommand::RunWorkload(NYdbWorkload::IWorkloadQueryGenerator& workloadGen, const int type) {
270270
if (!Quiet) {
271-
std::cout << "Window\tTxs\tTxs/Sec\tRetries\tErrors\tp50(ms)\tp95(ms)\tp99(ms)\tpMax(ms)";
271+
std::cout << "Window\t" << std::setw(7) << "Txs" << "\tTxs/Sec\tRetries\tErrors\tp50(ms)\tp95(ms)\tp99(ms)\tpMax(ms)";
272272
if (PrintTimestamp) {
273273
std::cout << "\tTimestamp";
274274
}
@@ -303,8 +303,9 @@ int TWorkloadCommand::RunWorkload(NYdbWorkload::IWorkloadQueryGenerator& workloa
303303
PrintWindowStats(windowIt++);
304304

305305
auto stats = GetWorkloadStats(TotalHist);
306-
std::cout << std::endl << "Txs\tTxs/Sec\tRetries\tErrors\tp50(ms)\tp95(ms)\tp99(ms)\tpMax(ms)" << std::endl
307-
<< stats.OpsCount << "\t" << std::setw(7) << stats.OpsCount / (TotalSec * 1.0) << "\t" << TotalRetries.load() << "\t"
306+
std::cout << std::endl << "Total\t" << std::setw(7) << "Txs" << "\tTxs/Sec\tRetries\tErrors\tp50(ms)\tp95(ms)\tp99(ms)\tpMax(ms)" << std::endl
307+
<< windowIt - 1 << "\t"
308+
<< std::setw(7) << stats.OpsCount << "\t" << stats.OpsCount / (TotalSec * 1.0) << "\t" << TotalRetries.load() << "\t"
308309
<< TotalErrors.load() << "\t" << stats.Percentile50 << "\t" << stats.Percentile95 << "\t"
309310
<< stats.Percentile99 << "\t" << stats.Percentile100 << std::endl;
310311

0 commit comments

Comments
 (0)