Globalize autotuned system power source
This commit is contained in:
@@ -420,7 +420,7 @@ func TestHandleMetricsChartSVGRendersCustomSVG(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestChartDataFromSamplesServerPowerUsesPerPSUDatasets(t *testing.T) {
|
||||
func TestChartDataFromSamplesServerPowerUsesResolvedSystemPower(t *testing.T) {
|
||||
start := time.Date(2026, 4, 5, 12, 0, 0, 0, time.UTC)
|
||||
samples := []platform.LiveMetricSample{
|
||||
{
|
||||
@@ -429,7 +429,9 @@ func TestChartDataFromSamplesServerPowerUsesPerPSUDatasets(t *testing.T) {
|
||||
{Slot: 1, PowerW: 120},
|
||||
{Slot: 2, PowerW: 130},
|
||||
},
|
||||
PowerW: 250,
|
||||
PowerW: 250,
|
||||
PowerSource: "sdr_psu_input",
|
||||
PowerMode: "autotuned",
|
||||
},
|
||||
{
|
||||
Timestamp: start.Add(time.Minute),
|
||||
@@ -437,7 +439,9 @@ func TestChartDataFromSamplesServerPowerUsesPerPSUDatasets(t *testing.T) {
|
||||
{Slot: 1, PowerW: 140},
|
||||
{Slot: 2, PowerW: 135},
|
||||
},
|
||||
PowerW: 275,
|
||||
PowerW: 275,
|
||||
PowerSource: "sdr_psu_input",
|
||||
PowerMode: "autotuned",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -448,13 +452,13 @@ func TestChartDataFromSamplesServerPowerUsesPerPSUDatasets(t *testing.T) {
|
||||
if title != "System Power" {
|
||||
t.Fatalf("title=%q", title)
|
||||
}
|
||||
if !stacked {
|
||||
t.Fatal("expected stacked PSU chart")
|
||||
if stacked {
|
||||
t.Fatal("server-power should use resolved system power, not stacked PSU inputs")
|
||||
}
|
||||
if len(datasets) != 2 || len(names) != 2 {
|
||||
t.Fatalf("datasets=%d names=%d want 2/2", len(datasets), len(names))
|
||||
if len(datasets) != 1 || len(names) != 1 {
|
||||
t.Fatalf("datasets=%d names=%d want 1/1", len(datasets), len(names))
|
||||
}
|
||||
if names[0] != "PSU 1" || names[1] != "PSU 2" {
|
||||
if names[0] != "Power W · sdr_psu_input (autotuned)" {
|
||||
t.Fatalf("names=%v", names)
|
||||
}
|
||||
}
|
||||
@@ -689,9 +693,12 @@ func TestBenchmarkPageRendersGPUSelectionControls(t *testing.T) {
|
||||
`/api/gpu/nvidia`,
|
||||
`/api/bee-bench/nvidia/perf/run`,
|
||||
`/api/bee-bench/nvidia/power/run`,
|
||||
`/api/bee-bench/nvidia/autotune/run`,
|
||||
`/api/bee-bench/nvidia/autotune/status`,
|
||||
`benchmark-run-nccl`,
|
||||
`Run Performance Benchmark`,
|
||||
`Run Power / Thermal Fit`,
|
||||
`Autotune`,
|
||||
} {
|
||||
if !strings.Contains(body, needle) {
|
||||
t.Fatalf("benchmark page missing %q: %s", needle, body)
|
||||
|
||||
Reference in New Issue
Block a user