Change time showed in report

This commit is contained in:
2024-07-24 18:40:59 +02:00
parent 5d5f49777e
commit 45af550cf9
2 changed files with 11 additions and 3 deletions

View File

@@ -396,8 +396,14 @@ namespace platform {
OptionsMenu& menu = output_type == OutputType::EXPERIMENTS ? main_menu : list_menu;
bool parserError = true; // force the first iteration
while (parserError) {
int index_menu;
auto [min_index, max_index] = paginator[static_cast<int>(output_type)].getOffset();
std::tie(option, index, parserError) = menu.parse('r', min_index, max_index);
std::tie(option, index_menu, parserError) = menu.parse('r', min_index, max_index);
if (output_type == OutputType::EXPERIMENTS) {
index = index_menu;
} else {
subIndex = index_menu;
}
if (min_columns > cols) {
std::cerr << "Make screen bigger to fit the results! " + std::to_string(min_columns - cols) + " columns needed! " << std::endl;
return;

View File

@@ -2,6 +2,7 @@
#include <locale>
#include "best/BestScore.h"
#include "common/CLocale.h"
#include "common/Timer.h"
#include "ReportConsole.h"
#include "main/Scores.h"
@@ -30,8 +31,9 @@ namespace platform {
"Random seeds: " + fromVector("seeds") + " Discretized: " + (data["discretized"].get<bool>() ? "True" : "False") + algorithm
+ " Stratified: " + (data["stratified"].get<bool>() ? "True" : "False") + " Smooth Strategy: " + smooth
);
oss << "Execution took " << std::setprecision(2) << std::fixed << data["duration"].get<float>()
<< " seconds, " << data["duration"].get<float>() / 3600 << " hours, on " << data["platform"].get<std::string>();
Timer timer;
oss << "Execution took " << timer.translate2String(data["duration"].get<float>())
<< " on " << data["platform"].get<std::string>() << " Language: " << data["language"].get<std::string>();
sheader << headerLine(oss.str());
sheader << headerLine("Score is " + data["score_name"].get<std::string>());
sheader << std::string(MAXL, '*') << std::endl;