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

Function BenchmarkProcessReadFile1000Bytes

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

Source from the content-addressed store, hash-verified

68}
69
70func BenchmarkProcessReadFile1000Bytes(b *testing.B) {
71 b.StopTimer()
72 Hash = append(Hash, "all")
73
74 content := ""
75 for i := 0; i < 1000; i++ {
76 content += "1"
77 }
78
79 data := []byte(content)
80 var count int64
81
82 b.StartTimer()
83
84 for i := 0; i < b.N; i++ {
85 res, _ := processReadFileParallel("filenane", &data)
86 count += res.Bytes
87 }
88 b.Log(count)
89}
90
91func BenchmarkProcessReadFileSingle100Bytes(b *testing.B) {
92 b.StopTimer()

Callers

nothing calls this directly

Calls 1

processReadFileParallelFunction · 0.85

Tested by

no test coverage detected