Skip to content

Commit a2370dc

Browse files
committed
Fix benchmarks
1 parent dabcf45 commit a2370dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

benchmark/benchmark_large_payload_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import (
2222
*/
2323
func BenchmarkJsonParserLarge(b *testing.B) {
2424
for i := 0; i < b.N; i++ {
25-
jsonparser.ArrayEach(largeFixture, func(value []byte, dataType int, offset int, err error) {
25+
jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
2626
jsonparser.Get(value, "username")
2727
nothing()
2828
}, "users")
2929

30-
jsonparser.ArrayEach(largeFixture, func(value []byte, dataType int, offset int, err error) {
30+
jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
3131
jsonparser.GetInt(value, "id")
3232
jsonparser.Get(value, "slug")
3333
nothing()

benchmark/benchmark_medium_payload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func BenchmarkJsonParserMedium(b *testing.B) {
2727
jsonparser.GetInt(mediumFixture, "person", "github", "followers")
2828
jsonparser.Get(mediumFixture, "company")
2929

30-
jsonparser.ArrayEach(mediumFixture, func(value []byte, dataType int, offset int, err error) {
30+
jsonparser.ArrayEach(mediumFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
3131
jsonparser.Get(value, "url")
3232
nothing()
3333
}, "person", "gravatar", "avatars")

0 commit comments

Comments
 (0)