pub struct Results {
pub schema: String,
pub kernel: String,
pub entry: String,
pub plan_cc: String,
pub device_name: String,
pub device_cc: String,
pub driver_version: String,
pub candidates: Vec<CandidateResult>,
pub total_gpu_seconds: f64,
pub strategy: Option<String>,
pub budget_exhausted: bool,
}Fields§
§schema: String§kernel: String§entry: String§plan_cc: String§device_name: String§device_cc: String§driver_version: String§candidates: Vec<CandidateResult>§total_gpu_seconds: f64§strategy: Option<String>Strategy that produced the visiting order (exhaustive | random:<seed>).
budget_exhausted: boolTrue when the sweep stopped because the wall budget ran out.
Implementations§
Source§impl Results
impl Results
Sourcepub fn load(path: &Path) -> Result<Option<Self>, String>
pub fn load(path: &Path) -> Result<Option<Self>, String>
Read results.v1 from a run directory.
Ok(None) means one thing only: the file is not there, so the
measurement box has not run yet. Everything else is an error.
This used to be read_to_string(path).ok()? then from_str().ok(),
so a truncated file, an empty one, null, [], a results.v2 from
a newer runner and a directory named results.json all collapsed
into that same None — and report rendered “nothing measured yet”,
exit 0, nothing on stderr, with a JSON report that validated. The run
directory is the hand-off between two machines, and the two
conditions call for opposite actions: wait, or go and look. Nothing
told them apart.
verdicts.v1 two lines away in the report builder already checked
its schema tag by name; this is the same check, so a future
results.v2 is refused by name rather than read as nothing.
§Errors
Any I/O error that is not NotFound, any parse failure, and any
document whose schema is not results.v1 — each naming the path.