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

Function Fuzz

expfmt/fuzz.go:28–37  ·  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

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

Callers

nothing calls this directly

Calls 1

TextToMetricFamiliesMethod · 0.95

Tested by

no test coverage detected