feat(tui): GPU Platform Stress Test — live nvtop chart during test
Apply the same pattern as NVIDIA SAT: launch nvtop via tea.ExecProcess so it occupies the full terminal as a live GPU chart (temp, power, fan, utilisation lines) while the stress test runs in the background. - Add screenGPUStressRunning screen + dedicated running/render handlers - startGPUStressTest: tea.Batch(stress goroutine, tea.ExecProcess(nvtop)) - [o] reopen nvtop at any time; [a] abort (cancels context) - Graceful degradation: test still runs if nvtop is not on PATH - gpuStressDoneMsg routes result to screenOutput on completion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package tui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"bee/audit/internal/platform"
|
||||
@@ -140,20 +139,7 @@ func (m model) updateConfirm(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
pollSATProgress("gpu-amd", since),
|
||||
)
|
||||
case actionRunFanStress:
|
||||
m.busyTitle = "GPU Platform Stress Test"
|
||||
m.progressPrefix = "fan-stress"
|
||||
m.progressSince = time.Now()
|
||||
m.progressLines = nil
|
||||
since := m.progressSince
|
||||
opts := hcFanStressOpts(m.hcMode, m.app)
|
||||
return m, tea.Batch(
|
||||
func() tea.Msg {
|
||||
ctx := context.Background()
|
||||
result, err := m.app.RunFanStressTestResult(ctx, opts)
|
||||
return resultMsg{title: result.Title, body: result.Body, err: err, back: screenHealthCheck}
|
||||
},
|
||||
pollSATProgress("fan-stress", since),
|
||||
)
|
||||
return m.startGPUStressTest()
|
||||
}
|
||||
case "ctrl+c":
|
||||
return m, tea.Quit
|
||||
|
||||
Reference in New Issue
Block a user