summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorCastor Fu <castor@alumni.caltech.edu>2013-10-31 11:00:34 -0600
committerJens Axboe <axboe@kernel.dk>2013-10-31 11:00:34 -0600
commit952b05e00103bf45576e1860cde0626bd42ed52a (patch)
treedca89d04b01dfbf99d2ea375922446e2fea9eebe /json.h
parent8afbf87460396a13e025cdd2203978d137a14a74 (diff)
downloadfio-952b05e00103bf45576e1860cde0626bd42ed52a.tar.gz
fio-952b05e00103bf45576e1860cde0626bd42ed52a.tar.bz2
Add json output for client/server mode
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>
Diffstat (limited to 'json.h')
-rw-r--r--json.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/json.h b/json.h
index 4d05e823..2a798ceb 100644
--- a/json.h
+++ b/json.h
@@ -73,5 +73,8 @@ int json_array_add_value_type(struct json_array *array, int type, ...);
#define json_array_add_value_array(obj, val) \
json_array_add_value_type((obj), JSON_TYPE_ARRAY, (val))
+#define json_array_last_value_object(obj) \
+ (obj->values[obj->value_cnt - 1]->object)
+
void json_print_object(struct json_object *obj);
#endif