MCPcopy
hub / github.com/google/uuid / BenchmarkUUID_URN

Function BenchmarkUUID_URN

uuid_test.go:704–714  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

702}
703
704func BenchmarkUUID_URN(b *testing.B) {
705 uuid, err := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
706 if err != nil {
707 b.Fatal(err)
708 }
709 for i := 0; i < b.N; i++ {
710 if uuid.URN() == "" {
711 b.Fatal("invalid uuid")
712 }
713 }
714}
715
716func BenchmarkParseBadLength(b *testing.B) {
717 short := asString[:10]

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.85
URNMethod · 0.80

Tested by

no test coverage detected