Add variable width of dataset name in reports

This commit is contained in:
2023-10-22 22:58:52 +02:00
parent 833acefbb3
commit 7bcd2eed06
4 changed files with 14 additions and 10 deletions

View File

@@ -46,13 +46,14 @@ namespace platform {
cout << Colors::MAGENTA() << "Only listing partial results" << endl;
}
auto i = 0;
cout << Colors::GREEN() << " # Date Model Score Name Score C/P Duration Title" << endl;
cout << "=== ========== ============ =========== =========== === ========= =============================================================" << endl;
int maxModel = results.maxModelSize();
cout << Colors::GREEN() << " # Date " << setw(maxModel) << left << "Model" << " Score Name Score C / P Duration Title" << endl;
cout << "=== ========== " << string(maxModel, '=') << " =========== =========== === ========= =============================================================" << endl;
bool odd = true;
for (auto& result : results) {
auto color = odd ? Colors::BLUE() : Colors::CYAN();
cout << color << setw(3) << fixed << right << i++ << " ";
cout << result.to_string() << endl;
cout << result.to_string(maxModel) << endl;
if (i == numFiles) {
break;
}