(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestNewStat_Memory(t *testing.T) { |
| 73 | if !testutils.IsSingleTesting() { |
| 74 | return |
| 75 | } |
| 76 | |
| 77 | var stat = cachehits.NewStat(20) |
| 78 | for i := 0; i < 10_000_000; i++ { |
| 79 | stat.IncreaseCached("a" + types.String(i)) |
| 80 | } |
| 81 | |
| 82 | time.Sleep(60 * time.Second) |
| 83 | |
| 84 | t.Log(stat.Len()) |
| 85 | } |
| 86 | |
| 87 | func BenchmarkStat(b *testing.B) { |
| 88 | runtime.GOMAXPROCS(4) |
nothing calls this directly
no test coverage detected