Lines Matching refs:w
39 #define WJSON_STAT(w, stats, group, field, units) \ argument
40 spdk_json_write_named_object_begin(w, #field); \
41 spdk_json_write_named_uint64(w, "count", stats->group.field.value); \
42 spdk_json_write_named_string_fmt(w, "percentage", "%lu.%lu", \
44 spdk_json_write_named_string(w, "units", units); \
45 spdk_json_write_object_end(w);
48 vbdev_ocf_stats_write_json(struct spdk_json_write_ctx *w, struct vbdev_ocf_stats *stats) in vbdev_ocf_stats_write_json() argument
50 spdk_json_write_object_begin(w); in vbdev_ocf_stats_write_json()
52 spdk_json_write_named_object_begin(w, "usage"); in vbdev_ocf_stats_write_json()
53 WJSON_STAT(w, stats, usage, occupancy, "4KiB blocks"); in vbdev_ocf_stats_write_json()
54 WJSON_STAT(w, stats, usage, free, "4KiB blocks"); in vbdev_ocf_stats_write_json()
55 WJSON_STAT(w, stats, usage, clean, "4KiB blocks"); in vbdev_ocf_stats_write_json()
56 WJSON_STAT(w, stats, usage, dirty, "4KiB blocks"); in vbdev_ocf_stats_write_json()
57 spdk_json_write_object_end(w); in vbdev_ocf_stats_write_json()
59 spdk_json_write_named_object_begin(w, "requests"); in vbdev_ocf_stats_write_json()
60 WJSON_STAT(w, stats, reqs, rd_hits, "Requests"); in vbdev_ocf_stats_write_json()
61 WJSON_STAT(w, stats, reqs, rd_partial_misses, "Requests"); in vbdev_ocf_stats_write_json()
62 WJSON_STAT(w, stats, reqs, rd_full_misses, "Requests"); in vbdev_ocf_stats_write_json()
63 WJSON_STAT(w, stats, reqs, rd_total, "Requests"); in vbdev_ocf_stats_write_json()
64 WJSON_STAT(w, stats, reqs, wr_hits, "Requests"); in vbdev_ocf_stats_write_json()
65 WJSON_STAT(w, stats, reqs, wr_partial_misses, "Requests"); in vbdev_ocf_stats_write_json()
66 WJSON_STAT(w, stats, reqs, wr_full_misses, "Requests"); in vbdev_ocf_stats_write_json()
67 WJSON_STAT(w, stats, reqs, wr_total, "Requests"); in vbdev_ocf_stats_write_json()
68 WJSON_STAT(w, stats, reqs, rd_pt, "Requests"); in vbdev_ocf_stats_write_json()
69 WJSON_STAT(w, stats, reqs, wr_pt, "Requests"); in vbdev_ocf_stats_write_json()
70 WJSON_STAT(w, stats, reqs, serviced, "Requests"); in vbdev_ocf_stats_write_json()
71 WJSON_STAT(w, stats, reqs, total, "Requests"); in vbdev_ocf_stats_write_json()
72 spdk_json_write_object_end(w); in vbdev_ocf_stats_write_json()
74 spdk_json_write_named_object_begin(w, "blocks"); in vbdev_ocf_stats_write_json()
75 WJSON_STAT(w, stats, blocks, core_volume_rd, "4KiB blocks"); in vbdev_ocf_stats_write_json()
76 WJSON_STAT(w, stats, blocks, core_volume_wr, "4KiB blocks"); in vbdev_ocf_stats_write_json()
77 WJSON_STAT(w, stats, blocks, core_volume_total, "4KiB blocks"); in vbdev_ocf_stats_write_json()
78 WJSON_STAT(w, stats, blocks, cache_volume_rd, "4KiB blocks"); in vbdev_ocf_stats_write_json()
79 WJSON_STAT(w, stats, blocks, cache_volume_wr, "4KiB blocks"); in vbdev_ocf_stats_write_json()
80 WJSON_STAT(w, stats, blocks, cache_volume_total, "4KiB blocks"); in vbdev_ocf_stats_write_json()
81 WJSON_STAT(w, stats, blocks, volume_rd, "4KiB blocks"); in vbdev_ocf_stats_write_json()
82 WJSON_STAT(w, stats, blocks, volume_wr, "4KiB blocks"); in vbdev_ocf_stats_write_json()
83 WJSON_STAT(w, stats, blocks, volume_total, "4KiB blocks"); in vbdev_ocf_stats_write_json()
84 spdk_json_write_object_end(w); in vbdev_ocf_stats_write_json()
86 spdk_json_write_named_object_begin(w, "errors"); in vbdev_ocf_stats_write_json()
87 WJSON_STAT(w, stats, errors, core_volume_rd, "Requests"); in vbdev_ocf_stats_write_json()
88 WJSON_STAT(w, stats, errors, core_volume_wr, "Requests"); in vbdev_ocf_stats_write_json()
89 WJSON_STAT(w, stats, errors, core_volume_total, "Requests"); in vbdev_ocf_stats_write_json()
90 WJSON_STAT(w, stats, errors, cache_volume_rd, "Requests"); in vbdev_ocf_stats_write_json()
91 WJSON_STAT(w, stats, errors, cache_volume_wr, "Requests"); in vbdev_ocf_stats_write_json()
92 WJSON_STAT(w, stats, errors, cache_volume_total, "Requests"); in vbdev_ocf_stats_write_json()
93 WJSON_STAT(w, stats, errors, total, "Requests"); in vbdev_ocf_stats_write_json()
94 spdk_json_write_object_end(w); in vbdev_ocf_stats_write_json()
96 spdk_json_write_object_end(w); in vbdev_ocf_stats_write_json()