MCPcopy
hub / github.com/wal-g/wal-g / BenchmarkExtractAll

Function BenchmarkExtractAll

internal/compression/lzo/lzo_test.go:109–135  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

107}
108
109func BenchmarkExtractAll(b *testing.B) {
110 b.SetBytes(int64(b.N * 1024 * 1024))
111 out := make([]internal.ReaderMaker, 1)
112 rand := setupRand(7924, b.N*1024*1024)
113 fmt.Println("B.N", b.N)
114
115 out[0] = rand
116
117 b.ResetTimer()
118
119 // f := &extract.FileTarInterpreter{
120 // DBDataDirectory: "",
121 // }
122 // out[0] = f
123
124 // extract.ExtractAll(f, out)
125
126 // np := &extract.NOPTarInterpreter{}
127 // extract.ExtractAll(np, out)
128
129 buf := &testtools.BufferTarInterpreter{}
130 err := internal.ExtractAll(buf, out)
131 if err != nil {
132 b.Log(err)
133 }
134
135}
136
137// Used to mock files in memory.
138type BufferReaderMaker struct {

Callers

nothing calls this directly

Calls 3

ExtractAllFunction · 0.92
setupRandFunction · 0.85
PrintlnMethod · 0.80

Tested by

no test coverage detected