diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2024-04-09 15:30:48 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2024-04-12 10:32:30 -0400 |
commit | 42fa4b660143b66bea1fb90793ec90054e170c93 (patch) | |
tree | 058096389cf8c17ab2dceb0b8b9fb7bf55ad522c /src/test/modules/test_json_parser/test_json_parser_perf.c | |
parent | b8a7bfa33324bc40c7180cb946a39378fb48309c (diff) | |
download | postgresql-42fa4b660143b66bea1fb90793ec90054e170c93.tar.gz postgresql-42fa4b660143b66bea1fb90793ec90054e170c93.zip |
Assorted minor cleanups in the test_json_parser module
Per gripes from Michael Paquier
Discussion: https://postgr.es/m/ZhTQ6_w1vwOhqTQI@paquier.xyz
Along the way, also clean up a handful of typos in 3311ea86ed and
ea7b4e9a2a, found by Alexander Lakhin, and a couple of stylistic
snafus noted by Daniel Westermann and Daniel Gustafsson.
Diffstat (limited to 'src/test/modules/test_json_parser/test_json_parser_perf.c')
-rw-r--r-- | src/test/modules/test_json_parser/test_json_parser_perf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/modules/test_json_parser/test_json_parser_perf.c b/src/test/modules/test_json_parser/test_json_parser_perf.c index 517dc8529ac..c463046848c 100644 --- a/src/test/modules/test_json_parser/test_json_parser_perf.c +++ b/src/test/modules/test_json_parser/test_json_parser_perf.c @@ -1,14 +1,14 @@ /*------------------------------------------------------------------------- * * test_json_parser_perf.c - * Performancet est program for both flavors of the JSON parser + * Performance test program for both flavors of the JSON parser * - * Copyright (c) 2023, PostgreSQL Global Development Group + * Copyright (c) 2024, PostgreSQL Global Development Group * * IDENTIFICATION * src/test/modules/test_json_parser/test_json_parser_perf.c * - * This progam tests either the standard (recursive descent) JSON parser + * This program tests either the standard (recursive descent) JSON parser * or the incremental (table driven) parser, but without breaking the input * into chunks in the latter case. Thus it can be used to compare the pure * parsing speed of the two parsers. If the "-i" option is used, then the @@ -28,11 +28,12 @@ #include <stdio.h> #include <string.h> +#define BUFSIZE 6000 + int main(int argc, char **argv) { - /* max delicious line length is less than this */ - char buff[6001]; + char buff[BUFSIZE]; FILE *json_file; JsonParseErrorType result; JsonLexContext *lex; |