Benchmarks Below
(b *testing.B)
| 26 | ////////////////////////////////////////////////// |
| 27 | |
| 28 | func 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 | |
| 49 | func BenchmarkProcessReadFile500Bytes(b *testing.B) { |
| 50 | b.StopTimer() |
nothing calls this directly
no test coverage detected