MCPcopy Create free account
hub / github.com/google/uuid / BenchmarkUUID_UnmarshalJSON

Function BenchmarkUUID_UnmarshalJSON

json_test.go:102–113  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

100}
101
102func BenchmarkUUID_UnmarshalJSON(b *testing.B) {
103 js := []byte(`{"uuid":"f47ac10b-58cc-0372-8567-0e02b2c3d479"}`)
104 var x *struct {
105 UUID UUID `json:"uuid"`
106 }
107 for i := 0; i < b.N; i++ {
108 err := json.Unmarshal(js, &x)
109 if err != nil {
110 b.Fatalf("marshal json: %#v (%v)", js, err)
111 }
112 }
113}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected