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

Function TestPartialRanges_Encode_JSON

internal/caches/partial_ranges_test.go:150–162  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

148}
149
150func TestPartialRanges_Encode_JSON(t *testing.T) {
151 var r = caches.NewPartialRanges(0)
152 for i := 0; i < 10; i++ {
153 r.Ranges = append(r.Ranges, [2]int64{int64(i * 100), int64(i*100 + 100)})
154 }
155 var before = time.Now()
156 data, err := json.Marshal(r)
157 if err != nil {
158 t.Fatal(err)
159 }
160 t.Log(time.Since(before).Seconds()*1000, "ms")
161 t.Log(len(data))
162}
163
164func TestPartialRanges_Encode_String(t *testing.T) {
165 var r = caches.NewPartialRanges(0)

Callers

nothing calls this directly

Calls 2

NewPartialRangesFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected