MCPcopy Create free account
hub / github.com/prometheus/common / Fuzz

Function Fuzz

expfmt/fuzz.go:31–39  ·  view source on GitHub ↗

Fuzz text metric parser with with github.com/dvyukov/go-fuzz: go-fuzz-build github.com/prometheus/common/expfmt go-fuzz -bin expfmt-fuzz.zip -workdir fuzz Further input samples should go in the folder fuzz/corpus.

(in []byte)

Source from the content-addressed store, hash-verified

29//
30// Further input samples should go in the folder fuzz/corpus.
31func Fuzz(in []byte) int {
32 parser := NewTextParser(model.UTF8Validation)
33 _, err := parser.TextToMetricFamilies(bytes.NewReader(in))
34 if err != nil {
35 return 0
36 }
37
38 return 1
39}

Callers

nothing calls this directly

Calls 2

TextToMetricFamiliesMethod · 0.95
NewTextParserFunction · 0.85

Tested by

no test coverage detected