Fix exotic CPU stub idle-mining guard and document Linux headless screenshots.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Return sane fallback CPU percent after first sample on unknown Unix platforms; add xvfb/scrot docs and stub tests; clear PROBLEMS.md open bugs.
This commit is contained in:
15
agent/stats/cpu_stub_test.go
Normal file
15
agent/stats/cpu_stub_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//go:build !windows && !linux && !darwin
|
||||
|
||||
package stats
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestStubPlatformSystemCPUPercentUsesFallback(t *testing.T) {
|
||||
r := NewReporter()
|
||||
if got := r.SystemCPUPercent(); got != 0 {
|
||||
t.Fatalf("first SystemCPUPercent want 0 got %v", got)
|
||||
}
|
||||
if got := r.SystemCPUPercent(); got != StubFallbackCPUPercent {
|
||||
t.Fatalf("second SystemCPUPercent want %v got %v", StubFallbackCPUPercent, got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user