File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ dom0-packages:
18
18
- btrfs-progs
19
19
- python3-nose2
20
20
- python3-objgraph
21
+ - python3-deepmerge
21
22
- patch
22
23
- qubes-video-companion-dom0
23
24
- split-gpg2-dom0
Original file line number Diff line number Diff line change @@ -341,15 +341,24 @@ def get_performance_data(self):
341
341
342
342
343
343
if 'dispvm_perf' in json_data ['job' ]['name' ]:
344
- for line in perf_data .split ("\n " ):
345
- if not line :
346
- continue
347
- data = line .split (" " )
348
- name = data [0 ]
349
- value = data [1 ]
350
- data_dict = dict (item .split ("=" , maxsplit = 1 ) for item in data [2 :])
351
- key = name + "(avg:" + data_dict ["average" ] + ")"
352
- result [key ] = float (value )
344
+ try :
345
+ data = json .loads (perf_data )
346
+ for key , value in data .items ():
347
+ name = value ["name" ]
348
+ mean = value ["mean" ]
349
+ total = value ["total" ]
350
+ key = name + "(mean:" + str (mean ) + ")"
351
+ result [key ] = float (total )
352
+ except json .decoder .JSONDecodeError :
353
+ for line in perf_data .split ("\n " ):
354
+ if not line :
355
+ continue
356
+ data = line .split (" " )
357
+ name = data [0 ]
358
+ value = data [1 ]
359
+ data_dict = dict (v .split ("=" , maxsplit = 1 ) for v in data [2 :])
360
+ key = name + "(avg:" + data_dict ["average" ] + ")"
361
+ result [key ] = float (total )
353
362
return result
354
363
355
364
if 'qrexec_perf' in json_data ['job' ]['name' ]:
You can’t perform that action at this time.
0 commit comments