MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / BenchmarkReplaceEntitiesBytes

Function BenchmarkReplaceEntitiesBytes

xmlparser/entities_test.go:111–125  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

109}
110
111func BenchmarkReplaceEntitiesBytes(b *testing.B) {
112 em := map[string][]byte{
113 "entity1": []byte("Entity Value1"),
114 "entity2": []byte("Entity Value2"),
115 "entity3": []byte("Entity Value3"),
116 }
117
118 data := []byte("This is a test string with &entity1;, &entity2;, and &entity3; to be replaced.")
119
120 b.ResetTimer()
121
122 for b.Loop() {
123 _ = xmlparser.ReplaceEntitiesBytes(data, em)
124 }
125}

Callers

nothing calls this directly

Calls 1

ReplaceEntitiesBytesFunction · 0.92

Tested by

no test coverage detected