summaryrefslogtreecommitdiff
path: root/json.h
AgeCommit message (Collapse)Author
11 daysMake the JSON code easier to analyzeBart Van Assche
Coverity reports the following false positive for the JSON code in stat.c: CID 284826 (#1 of 1): Resource leak (RESOURCE_LEAK) 17. leaked_storage: Variable percentile_object going out of scope leaks the storage it points to. Suppress this false positive by making the JSON code easier to analyze. The changes in this patch are as follows: - Change the macros in json.h into inline functions such that the compiler performs argument type verification at compile time. - Pass a struct json_value pointer to json_*_add_value_type() instead of using varargs. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2018-03-21Refactor #includes and headersSitsofe Wheeler
- Try and remove unneeded #include lines - Try and add #include lines that would allow the files to be built in a more standalone manner Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2015-10-27Enable the use of multiple output formatsJens Axboe
You can now do ./fio --output-format=normal,json jobfile.fio and get both types of output. Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-24Cast input argument for json_object_add_value_int to long longPuthikorn Voravootivat
The latency related (and some other) variables type is uint32_t but the JSON integer type is long long. So we need to cast the numbers to long long type to make JSON output correctly. Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org> Signed-off-by: Jens Axboe <axboe@fb.com>
2014-04-03Fix JSON_INTEGER overflow on Windows by changing datatype to 'long long'Bruce Cran
Signed-off-by: Jens Axboe <axboe@fb.com>
2013-10-31Add json output for client/server modeCastor Fu
In client/server mode, this adds support for json mode. Each job's details are gradually accumulated and upon completion the client dumps the full json tree. The tree is annotated with the server host and port. Signed-off-by: Castor Fu <castor@alumni.caltech.edu> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-09-17Add a simple json encoder and use it to print fio output in json formatShaohua Li
Signed-off-by: Jens Axboe <axboe@kernel.dk>