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

Function BenchmarkProcessReadFileSingle100Bytes

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

Source from the content-addressed store, hash-verified

89}
90
91func BenchmarkProcessReadFileSingle100Bytes(b *testing.B) {
92 b.StopTimer()
93 Hash = append(Hash, "all")
94
95 content := ""
96 for i := 0; i < 100; i++ {
97 content += "1"
98 }
99
100 data := []byte(content)
101 var count int64
102
103 b.StartTimer()
104
105 for i := 0; i < b.N; i++ {
106 res, _ := processReadFile("filenane", &data)
107 count += res.Bytes
108 }
109 b.Log(count)
110}
111
112func BenchmarkProcessReadFileSingle500Bytes(b *testing.B) {
113 b.StopTimer()

Callers

nothing calls this directly

Calls 1

processReadFileFunction · 0.85

Tested by

no test coverage detected