Measuring it in the startup scan held every agent half a second or more before registering, which on a shared CI runner was past the failover tests' wait. Now it runs once a process, in the background, the first time it is asked for, and Heartbeat.mem_bandwidth_gbs carries it when known; the control plane keeps the last figure and a heartbeat without one leaves it. The agent's tests do not measure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
264 B
Go
14 lines
264 B
Go
package agent
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
// Half a gigabyte read per test binary, and contending with the tests
|
|
// for the CPUs: these never look at the figure.
|
|
measureBandwidth = func() float64 { return 0 }
|
|
os.Exit(m.Run())
|
|
}
|