Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
+3
-3
@@ -87,14 +87,14 @@ func BenchmarkParse(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
b.SetBytes(int64(len(benchDoc)))
|
||||
for b.Loop() {
|
||||
if _, err := Parse(benchDoc); err != nil {
|
||||
if _, err := ParseMap(benchDoc); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkMarshal(b *testing.B) {
|
||||
tree, err := Parse(benchDoc)
|
||||
tree, err := ParseMap(benchDoc)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
@@ -122,7 +122,7 @@ func BenchmarkParseLong(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
b.SetBytes(int64(len(longDoc)))
|
||||
for b.Loop() {
|
||||
if _, err := Parse(longDoc); err != nil {
|
||||
if _, err := ParseMap(longDoc); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user