MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestZero_Chan

Function TestZero_Chan

internal/zero/zero_test.go:10–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestZero_Chan(t *testing.T) {
11 var stat1 = &runtime.MemStats{}
12 runtime.ReadMemStats(stat1)
13
14 var m = make(chan Zero, 2_000_000)
15 for i := 0; i < 1_000_000; i++ {
16 m <- New()
17 }
18
19 var stat2 = &runtime.MemStats{}
20 runtime.ReadMemStats(stat2)
21 t.Log(stat2.HeapInuse, stat1.HeapInuse, stat2.HeapInuse-stat1.HeapInuse, "B")
22 t.Log(len(m))
23}
24
25func TestZero_Map(t *testing.T) {
26 var stat1 = &runtime.MemStats{}

Callers

nothing calls this directly

Calls 2

LogMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected