summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-11-03 08:26:36 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 17:33:03 +0000
commita607f435de1a04fed655a0f25d5a74724ba82ce0 (patch)
treed5c0c0fa410c2e640ef9c3b1f415f030b3b663e6 /bitbake/bin
parent92a9d6d55ddb64a12be4ad38e2ed4280ce59ba8e (diff)
downloadpoky-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')
-rwxr-xr-xbitbake/bin/bitbake-hashclient3
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
15import time 15import time
16import warnings 16import warnings
17import netrc 17import netrc
18import json
18warnings.simplefilter("default") 19warnings.simplefilter("default")
19 20
20try: 21try:
@@ -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):