We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96fcef2 commit d4c441aCopy full SHA for d4c441a
2 files changed
bench_test.go
@@ -7,6 +7,7 @@ import (
7
"bytes"
8
"io/fs"
9
"io/ioutil"
10
+ "os"
11
"path/filepath"
12
"sort"
13
"strings"
@@ -53,6 +54,20 @@ func BenchmarkDecode(b *testing.B) {
53
54
}
55
})
56
57
+
58
+ b.Run("large-doc", func(b *testing.B) {
59
+ d, err := os.ReadFile("testdata/ja-JP.toml")
60
+ if err != nil {
61
+ b.Fatal(err)
62
+ }
63
+ doc := string(d)
64
65
+ b.ResetTimer()
66
+ for n := 0; n < b.N; n++ {
67
+ var val map[string]interface{}
68
+ toml.Decode(doc, &val)
69
70
+ })
71
72
73
func BenchmarkEncode(b *testing.B) {
0 commit comments