GUI: dunkles Theme mit orangem Akzent, Ranking als Karten mit Tok/s, Logo und Icons, Start immer auf Benchmark

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 17:52:14 +01:00
parent ea4fb724d4
commit 0832b8c96f
26 changed files with 243 additions and 108 deletions

View File

@ -46,6 +46,9 @@ pub struct ModelRank {
pub successes: usize,
pub median_duration_ms: u128,
pub mean_completion_tokens: f64,
/// Median der Tokens pro Sekunde über die Läufe (Tokens geteilt durch die gesamte Laufzeit,
/// also inklusive Tool- und Prüfzeit, nicht die reine Erzeugungsgeschwindigkeit).
pub median_tps: Option<f64>,
}
#[derive(Debug, Clone, PartialEq, Serialize)]
@ -177,6 +180,16 @@ pub fn compute(batch_id: i64, all_runs: &[RunRecord], tasks: &BTreeMap<String, T
let mean_tokens =
rs.iter().map(|r| r.completion_tokens as f64).sum::<f64>() / rs.len() as f64;
let mut tps: Vec<f64> = rs.iter().filter_map(|r| r.tps).filter(|t| t.is_finite()).collect();
tps.sort_by(|a, b| a.partial_cmp(b).unwrap_or(std::cmp::Ordering::Equal));
let median_tps = if tps.is_empty() {
None
} else if tps.len() % 2 == 1 {
Some(tps[tps.len() / 2])
} else {
Some((tps[tps.len() / 2 - 1] + tps[tps.len() / 2]) / 2.0)
};
ModelRank {
rank: 0,
model: model.to_string(),
@ -187,6 +200,7 @@ pub fn compute(batch_id: i64, all_runs: &[RunRecord], tasks: &BTreeMap<String, T
successes: rs.iter().filter(|r| r.error_class == ErrorClass::Ok).count(),
median_duration_ms: median_u128(&durations),
mean_completion_tokens: mean_tokens,
median_tps,
}
})
.collect();