Player12
An open source football management simulator
Loading...
Searching...
No Matches
lab_report.h File Reference
#include <cstdint>
#include <map>
#include <nlohmann/json.hpp>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#include "tools/lab_stats.h"

Go to the source code of this file.

Classes

struct  Lab::TargetSpec
 
struct  Lab::ReportRow
 
struct  Lab::TextTable
 
struct  Lab::Summary
 
struct  Lab::LabReport
 

Namespaces

namespace  Lab
 
namespace  Lab::ExitCode
 

Enumerations

enum class  Lab::Tier : std::uint8_t { Lab::Gate , Lab::Monitor , Lab::Info }
 
enum class  Lab::Scope : std::uint8_t { Lab::Match , Lab::Engine , Lab::World , Lab::Tactics }
 
enum class  Lab::Unit : std::uint8_t { Lab::Number , Lab::Percent }
 

Functions

std::span< const TargetSpec > Lab::targetTable ()
 
std::vector< ReportRow > Lab::evaluateTargets (const std::map< std::string, Estimate > &metrics, std::span< const Scope > scopes)
 
std::string_view Lab::verdictName (Verdict verdict)
 
std::string_view Lab::tierName (Tier tier)
 
std::string Lab::formatValue (double value, Unit unit)
 
nlohmann::json Lab::toJson (const LabReport &report)
 
LabReport Lab::reportFromJson (const nlohmann::json &json)
 
std::string Lab::toMarkdown (const LabReport &report)
 

Variables

constexpr int Lab::ExitCode::OK = 0
 
constexpr int Lab::ExitCode::GATE_FAILED = 1
 
constexpr int Lab::ExitCode::MONITOR_BELOW_THRESHOLD = 2
 
constexpr int Lab::ExitCode::INVALID_ARGUMENTS = 3
 
constexpr int Lab::ExitCode::SIMULATION_ERROR = 4
 
constexpr double Lab::MONITOR_PASS_THRESHOLD = 0.9