File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 7
7
use PhpBench \Benchmark \Metadata \Annotations \Subject ;
8
8
9
9
if (!extension_loaded ('simdjson ' )) {
10
- exit ;
10
+ exit ;
11
11
}
12
12
13
13
/**
@@ -58,24 +58,40 @@ public function jsonValidate(): void
58
58
/**
59
59
* @Subject()
60
60
*/
61
- public function simdjsonDecodeAssoc ()
61
+ public function jsonKeyCount (): void
62
+ {
63
+ count (json_decode ($ this ->json , true )["statuses " ]);
64
+ }
65
+
66
+ /**
67
+ * @Subject()
68
+ */
69
+ public function simdjsonDecodeAssoc (): void
62
70
{
63
71
\simdjson_decode ($ this ->json , true );
64
72
}
65
73
66
74
/**
67
75
* @Subject()
68
76
*/
69
- public function simdjsonDecode ()
77
+ public function simdjsonDecode (): void
70
78
{
71
79
\simdjson_decode ($ this ->json , false );
72
80
}
73
81
74
82
/**
75
83
* @Subject()
76
84
*/
77
- public function simdjsonValidate ()
85
+ public function simdjsonValidate (): void
78
86
{
79
87
\simdjson_validate ($ this ->json );
80
88
}
89
+
90
+ /**
91
+ * @Subject()
92
+ */
93
+ public function simdjsonKeyCount (): void
94
+ {
95
+ \simdjson_key_count ($ this ->json , "/statuses " );
96
+ }
81
97
}
You can’t perform that action at this time.
0 commit comments