(b *testing.B)
| 93 | } |
| 94 | |
| 95 | func BenchmarkReplaceEntitiesString(b *testing.B) { |
| 96 | em := map[string][]byte{ |
| 97 | "entity1": []byte("Entity Value1"), |
| 98 | "entity2": []byte("Entity Value2"), |
| 99 | "entity3": []byte("Entity Value3"), |
| 100 | } |
| 101 | |
| 102 | data := "This is a test string with &entity1;, &entity2;, and &entity3; to be replaced." |
| 103 | |
| 104 | b.ResetTimer() |
| 105 | |
| 106 | for b.Loop() { |
| 107 | _ = xmlparser.ReplaceEntitiesString(data, em) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func BenchmarkReplaceEntitiesBytes(b *testing.B) { |
| 112 | em := map[string][]byte{ |
nothing calls this directly
no test coverage detected