MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestFormatBytesPrecision

Function TestFormatBytesPrecision

controlplane/memory_rebalancer_test.go:126–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124
125 got := r.MemoryLimit()
126 if got != "24576MB" {
127 t.Errorf("expected full budget of 24576MB, got %q", got)
128 }
129}
130
131func TestFormatBytesPrecision(t *testing.T) {
132 // 4.8GB = 4915MB, not truncated to 4GB
133 b := uint64(4915) * 1024 * 1024 // 4915MB
134 got := formatBytes(b)
135 if got != "4915MB" {
136 t.Errorf("formatBytes(4915MB) = %q, want %q", got, "4915MB")

Callers

nothing calls this directly

Calls 1

formatBytesFunction · 0.85

Tested by

no test coverage detected