Adding upstream version 0.10.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
104c0c203d
commit
e733edafba
141 changed files with 102352 additions and 0 deletions
24
benchmarks/path_test.go
Normal file
24
benchmarks/path_test.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package benchmark
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
gojson "github.com/goccy/go-json"
|
||||
)
|
||||
|
||||
func Benchmark_Decode_SmallStruct_UnmarshalPath_GoJson(b *testing.B) {
|
||||
path, err := gojson.CreatePath("$.st")
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
var v int
|
||||
if err := path.Unmarshal(SmallFixture, &v); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
if v != 1 {
|
||||
b.Fatal("failed to unmarshal path")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue