MCPcopy
hub / github.com/gogo/protobuf / init

Function init

proto/text_parser_test.go:686–698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

684var benchInput string
685
686func init() {
687 benchInput = "count: 4\n"
688 for i := 0; i < 1000; i++ {
689 benchInput += "pet: \"fido\"\n"
690 }
691
692 // Check it is valid input.
693 pb := new(MyMessage)
694 err := UnmarshalText(benchInput, pb)
695 if err != nil {
696 panic("Bad benchmark input: " + err.Error())
697 }
698}
699
700func BenchmarkUnmarshalText(b *testing.B) {
701 pb := new(MyMessage)

Callers

nothing calls this directly

Calls 2

UnmarshalTextFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…