(b *testing.B)
| 35 | } |
| 36 | |
| 37 | func BenchmarkBuildDtable(b *testing.B) { |
| 38 | for name, mk := range predefinedFSEInputs() { |
| 39 | b.Run(name, func(b *testing.B) { |
| 40 | s := mk() |
| 41 | b.ReportAllocs() |
| 42 | b.ResetTimer() |
| 43 | for i := 0; i < b.N; i++ { |
| 44 | // Reset the mutated parts so each iteration does real work. |
| 45 | for j := range s.dt { |
| 46 | s.dt[j] = 0 |
| 47 | } |
| 48 | for j := range s.stateTable { |
| 49 | s.stateTable[j] = 0 |
| 50 | } |
| 51 | if err := s.buildDtable(); err != nil { |
| 52 | b.Fatal(err) |
| 53 | } |
| 54 | } |
| 55 | }) |
| 56 | } |
| 57 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…