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

Function TestList_Memory

internal/utils/expires/list_test.go:144–160  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

142}
143
144func TestList_Memory(t *testing.T) {
145 if !testutils.IsSingleTesting() {
146 return
147 }
148
149 var list = expires.NewList()
150
151 testutils.StartMemoryStats(t, func() {
152 t.Log(list.Count(), "items")
153 })
154
155 for i := 0; i < 10_000_000; i++ {
156 list.Add(uint64(i), time.Now().Unix()+1800)
157 }
158
159 time.Sleep(1 * time.Hour)
160}
161
162func TestList_Map_Performance(t *testing.T) {
163 t.Log("max uint32", math.MaxUint32)

Callers

nothing calls this directly

Calls 7

IsSingleTestingFunction · 0.92
NewListFunction · 0.92
StartMemoryStatsFunction · 0.92
LogMethod · 0.80
UnixMethod · 0.80
CountMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected