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

Function BenchmarkProcessReadFile100Bytes

processor/workers_test.go:28–47  ·  view source on GitHub ↗

Benchmarks Below

(b *testing.B)

Source from the content-addressed store, hash-verified

26//////////////////////////////////////////////////
27
28func BenchmarkProcessReadFile100Bytes(b *testing.B) {
29 b.StopTimer()
30 Hash = append(Hash, "all")
31
32 content := ""
33 for i := 0; i < 100; i++ {
34 content += "1"
35 }
36
37 data := []byte(content)
38 var count int64
39
40 b.StartTimer()
41
42 for i := 0; i < b.N; i++ {
43 res, _ := processReadFileParallel("filenane", &data)
44 count += res.Bytes
45 }
46 b.Log(count)
47}
48
49func BenchmarkProcessReadFile500Bytes(b *testing.B) {
50 b.StopTimer()

Callers

nothing calls this directly

Calls 1

processReadFileParallelFunction · 0.85

Tested by

no test coverage detected