forked from mirror/go-json
Compare commits
1 Commits
master
...
feature/ad
Author | SHA1 | Date |
---|---|---|
Masaaki Goshima | 4092ca4896 |
|
@ -31,6 +31,16 @@ func Benchmark_Decode_SmallStruct_Unmarshal_JsonIter(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_SmallStruct_Unmarshal_EasyJson(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
result := NewSmallPayloadEasyJson()
|
||||
if err := result.UnmarshalJSON(SmallFixture); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_SmallStruct_Unmarshal_GoJay(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for n := 0; n < b.N; n++ {
|
||||
|
@ -161,6 +171,16 @@ func Benchmark_Decode_MediumStruct_Unmarshal_JsonIter(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_MediumStruct_Unmarshal_EasyJson(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
result := NewMediumPayloadEasyJson()
|
||||
if err := result.UnmarshalJSON(MediumFixture); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_MediumStruct_Unmarshal_GoJay(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for n := 0; n < b.N; n++ {
|
||||
|
@ -291,6 +311,16 @@ func Benchmark_Decode_LargeStruct_Unmarshal_JsonIter(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_LargeStruct_Unmarshal_EasyJson(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
result := NewLargePayloadEasyJson()
|
||||
if err := result.UnmarshalJSON(LargeFixture); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Benchmark_Decode_LargeStruct_Unmarshal_GoJay(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for n := 0; n < b.N; n++ {
|
||||
|
|
Loading…
Reference in New Issue