MCPcopy Create free account
hub / github.com/boyter/hashit / BenchmarkProcessReadFileSingle500Bytes

Function BenchmarkProcessReadFileSingle500Bytes

processor/workers_test.go:112–131  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

110}
111
112func BenchmarkProcessReadFileSingle500Bytes(b *testing.B) {
113 b.StopTimer()
114 Hash = append(Hash, "all")
115
116 content := ""
117 for i := 0; i < 700; i++ {
118 content += "1"
119 }
120
121 data := []byte(content)
122 var count int64
123
124 b.StartTimer()
125
126 for i := 0; i < b.N; i++ {
127 res, _ := processReadFile("filenane", &data)
128 count += res.Bytes
129 }
130 b.Log(count)
131}
132
133func BenchmarkProcessReadFileSingle1000Bytes(b *testing.B) {
134 b.StopTimer()

Callers

nothing calls this directly

Calls 1

processReadFileFunction · 0.85

Tested by

no test coverage detected