diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-11-03 08:26:36 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-09 17:33:03 +0000 |
commit | a607f435de1a04fed655a0f25d5a74724ba82ce0 (patch) | |
tree | d5c0c0fa410c2e640ef9c3b1f415f030b3b663e6 /bitbake/bin/bitbake-hashclient | |
parent | 92a9d6d55ddb64a12be4ad38e2ed4280ce59ba8e (diff) | |
download | poky-a607f435de1a04fed655a0f25d5a74724ba82ce0.tar.gz |
bitbake: bitbake-hashclient: Output stats in JSON format
Outputting the stats in JSON format makes more sense as it's easier for
a downstream tool to parse if desired.
(Bitbake rev: 3a18066e479ab06bdb08e258fc4aacad5e73222e)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-hashclient')
-rwxr-xr-x | bitbake/bin/bitbake-hashclient | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-hashclient b/bitbake/bin/bitbake-hashclient index 58aa02ee55..3ff7b76378 100755 --- a/bitbake/bin/bitbake-hashclient +++ b/bitbake/bin/bitbake-hashclient | |||
@@ -15,6 +15,7 @@ import threading | |||
15 | import time | 15 | import time |
16 | import warnings | 16 | import warnings |
17 | import netrc | 17 | import netrc |
18 | import json | ||
18 | warnings.simplefilter("default") | 19 | warnings.simplefilter("default") |
19 | 20 | ||
20 | try: | 21 | try: |
@@ -56,7 +57,7 @@ def main(): | |||
56 | s = client.reset_stats() | 57 | s = client.reset_stats() |
57 | else: | 58 | else: |
58 | s = client.get_stats() | 59 | s = client.get_stats() |
59 | pprint.pprint(s) | 60 | print(json.dumps(s, sort_keys=True, indent=4)) |
60 | return 0 | 61 | return 0 |
61 | 62 | ||
62 | def handle_stress(args, client): | 63 | def handle_stress(args, client): |