mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
scripts/pybootchartgui: Fix to work with python 3.8
time.clock() was removed in python 3.8, use one of its recommended replacements to fix failures on python 3.8 systems. (From OE-Core rev: f1d4ecce7d3968c5e08c268e3329041d4b647cf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -18,7 +18,7 @@ import string
|
||||
import re
|
||||
import sys
|
||||
import tarfile
|
||||
from time import clock
|
||||
import time
|
||||
from collections import defaultdict
|
||||
from functools import reduce
|
||||
|
||||
@@ -723,7 +723,7 @@ def get_num_cpus(headers):
|
||||
|
||||
def _do_parse(writer, state, filename, file):
|
||||
writer.info("parsing '%s'" % filename)
|
||||
t1 = clock()
|
||||
t1 = time.process_time()
|
||||
name = os.path.basename(filename)
|
||||
if name == "proc_diskstats.log":
|
||||
state.disk_stats = _parse_proc_disk_stat_log(file)
|
||||
@@ -743,7 +743,7 @@ def _do_parse(writer, state, filename, file):
|
||||
state.monitor_disk = _parse_monitor_disk_log(file)
|
||||
elif not filename.endswith('.log'):
|
||||
_parse_bitbake_buildstats(writer, state, filename, file)
|
||||
t2 = clock()
|
||||
t2 = time.process_time()
|
||||
writer.info(" %s seconds" % str(t2-t1))
|
||||
return state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user