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

Function BenchmarkPartialRanges_String

internal/caches/partial_ranges_test.go:221–232  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

219}
220
221func BenchmarkPartialRanges_String(b *testing.B) {
222 var r = caches.NewPartialRanges(0)
223 r.BodySize = 1024
224 for i := 0; i < 10; i++ {
225 r.Ranges = append(r.Ranges, [2]int64{int64(i * 100), int64(i*100 + 100)})
226 }
227 b.ResetTimer()
228
229 for i := 0; i < b.N; i++ {
230 _ = r.String()
231 }
232}

Callers

nothing calls this directly

Calls 2

NewPartialRangesFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected