Skip to content

Commit 92caf65

Browse files
committed
benchmark: create more json inputs
1 parent f7b22d6 commit 92caf65

4 files changed

Lines changed: 123 additions & 3 deletions

File tree

benchmark/json/json-buffer-parser.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ const path = require('node:path');
66
const assert = require('node:assert');
77

88
const configs = {
9-
n: [1024],
9+
n: [10],
1010
parser: ['native', 'node'],
11-
input: ['simple-string', 'simple-array', 'simple-object', 'nested-ascii', 'nested-unicode', 'twitter'],
11+
input: [
12+
'simple-string',
13+
'simple-number-array',
14+
'simple-string-array',
15+
'simple-object',
16+
'nested-ascii',
17+
'nested-unicode',
18+
'twitter',
19+
],
1220
};
1321

1422
const bench = common.createBenchmark(main, configs);

benchmark/json/json-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { parse } = require('node:json');
55
const path = require('node:path');
66

77
const configs = {
8-
n: [1024],
8+
n: [10],
99
parser: ['native', 'node'],
1010
input: ['simple-array', 'simple-object', 'nested-ascii', 'nested-unicode', 'twitter'],
1111
};
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
1,
3+
2,
4+
3,
5+
4,
6+
5,
7+
6,
8+
7,
9+
8,
10+
9,
11+
10,
12+
11,
13+
12,
14+
13,
15+
14,
16+
15,
17+
16,
18+
17,
19+
18,
20+
19,
21+
20,
22+
21,
23+
22,
24+
23,
25+
24,
26+
25,
27+
26,
28+
27,
29+
28,
30+
29,
31+
30,
32+
31,
33+
32,
34+
33,
35+
34,
36+
35,
37+
36,
38+
37,
39+
38,
40+
39,
41+
40,
42+
41,
43+
42,
44+
43,
45+
44,
46+
45,
47+
46,
48+
47,
49+
48,
50+
49,
51+
50,
52+
51,
53+
52,
54+
53,
55+
54,
56+
55,
57+
56,
58+
57,
59+
58,
60+
59,
61+
60,
62+
61,
63+
62,
64+
63,
65+
64,
66+
65,
67+
66,
68+
67,
69+
68,
70+
69,
71+
70,
72+
71,
73+
72,
74+
73,
75+
74,
76+
75,
77+
76,
78+
77,
79+
78,
80+
79,
81+
80,
82+
81,
83+
82,
84+
83,
85+
84,
86+
85,
87+
86,
88+
87,
89+
88,
90+
89,
91+
90,
92+
91,
93+
92,
94+
93,
95+
94,
96+
95,
97+
96,
98+
97,
99+
98,
100+
99,
101+
100
102+
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
"apple",
3+
"banana",
4+
"cherry",
5+
"date",
6+
"elderberry",
7+
"fig",
8+
"grape",
9+
"honeydew"
10+
]

0 commit comments

Comments
 (0)