func BenchmarkParse(b *testing.B) { r := strings.NewReader(schemaJSON) for i := 0; i < b.N; i++ { s, _ := schema.Read(r) _ = s } }
func BenchmarkParseAndMakeValidator(b *testing.B) { r := strings.NewReader(schemaJSON) for i := 0; i < b.N; i++ { s, _ := schema.Read(r) v := validator.New(s) v.Compile() // force compiling for comparison } }