ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Benchmark.hpp File Reference

Benchmark scenario types, JSON parsing, and subprocess-based execution. More...

#include "cli/CLIOptions.hpp"
#include <nlohmann/json.hpp>
#include <string>
#include <vector>
#include <optional>
#include <functional>

Go to the source code of this file.

Classes

struct  ppforest2::cli::BenchmarkSuite
 A suite of scenarios with shared defaults. More...
 
struct  ppforest2::cli::ConvergenceCriteria
 Convergence criteria for adaptive stopping in benchmarks. More...
 
struct  ppforest2::cli::Scenario
 A single benchmark scenario: data shape + model config. More...
 
struct  ppforest2::cli::ScenarioResult
 Result of running a single benchmark scenario. More...
 
struct  ppforest2::cli::SuiteResult
 Aggregated results for an entire suite run. More...
 

Namespaces

namespace  CLI
 
namespace  ppforest2
 
namespace  ppforest2::cli
 Command-line interface: argument parsing, subcommands, and benchmark/evaluation orchestration.
 

Typedefs

using ppforest2::cli::ProgressCallback = std::function<void(int scenario_index, int total, std::string const& name)>
 Callback for progress reporting during benchmark execution.
 

Functions

SuiteResult ppforest2::cli::parse_results (std::string const &path)
 Parse a SuiteResult from a JSON file (for baseline comparison).
 
BenchmarkSuite ppforest2::cli::parse_suite (nlohmann::json const &j)
 Parse a BenchmarkSuite from a JSON object.
 
BenchmarkSuite ppforest2::cli::parse_suite (std::string const &path)
 Parse a BenchmarkSuite from a JSON file path.
 
int ppforest2::cli::run_benchmark (CLIOptions &params, std::string const &binary_path)
 Run the benchmark subcommand.
 
ScenarioResult ppforest2::cli::run_scenario (Scenario const &scenario, std::string const &binary_path, bool quiet=false)
 Run a single scenario as a subprocess.
 
SuiteResult ppforest2::cli::run_suite (BenchmarkSuite const &suite, std::string const &binary_path, bool quiet=false, ProgressCallback progress=nullptr)
 Run all scenarios in a suite via subprocess invocations.
 
CLI::App * ppforest2::cli::setup_benchmark (CLI::App &app, CLIOptions &params)
 Register benchmark subcommand options on app.
 

Detailed Description

Benchmark scenario types, JSON parsing, and subprocess-based execution.

Each benchmark scenario runs as a separate ppforest2 evaluate process, giving accurate per-scenario peak RSS measurements.