MCPcopy Create free account
hub / github.com/astercloud/aster / BenchmarkCopy

Function BenchmarkCopy

pkg/stream/stream_test.go:450–463  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

448}
449
450func BenchmarkCopy(b *testing.B) {
451 data := make([]int, 1000)
452 for i := range data {
453 data[i] = i
454 }
455
456 for b.Loop() {
457 reader := FromSlice(data)
458 copies := reader.Copy(3)
459 for _, c := range copies {
460 _, _ = c.Collect()
461 }
462 }
463}
464
465func BenchmarkTransform(b *testing.B) {
466 data := make([]int, 1000)

Callers

nothing calls this directly

Calls 3

FromSliceFunction · 0.85
CopyMethod · 0.80
CollectMethod · 0.80

Tested by

no test coverage detected