Re: [igt-dev] [PATCH i-g-t] intel_gpu_top: Document how to use JSON output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 31/03/2021 10:12, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Put a note on how to use JSON output into the man page.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
References: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/100
---
  man/intel_gpu_top.rst | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/man/intel_gpu_top.rst b/man/intel_gpu_top.rst
index f6d74852558b..94fdc6520fd3 100644
--- a/man/intel_gpu_top.rst
+++ b/man/intel_gpu_top.rst
@@ -81,6 +81,11 @@ Filter types: ::
      pci      pci:[vendor=%04x/name][,device=%04x][,card=%d]
               vendor is hex number or vendor name
+JSON OUTPUT
+===========
+
+To parse the JSON as output by the tool the consumer should wrap its entirety into square brackets ([ ]). This will make each sample point an JSON array element and will avoid "Multiple root elements" JSON validation error.
+

Or as an alternative we make the tool do this, but it'd need a signal handler to print the closing bracket at which point I thought it could be a complication too far. Could be convinced either way I guess.

Regards,

Tvrtko

  LIMITATIONS
  ===========
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux