diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-15 12:03:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-15 22:23:19 +0000 |
commit | 9194c6c2499354faa53fb9008476670cc0e5c8b7 (patch) | |
tree | 3fd4ec6d9fbaeb0006c669e258afecfc7f1660c8 /scripts/pybootchartgui | |
parent | 0bd1b2aaf84b1c40b48b15ed4937d322296b4743 (diff) | |
download | poky-9194c6c2499354faa53fb9008476670cc0e5c8b7.tar.gz |
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>
Diffstat (limited to 'scripts/pybootchartgui')
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/parsing.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py index ef2d3d309c..b42dac6b88 100644 --- a/scripts/pybootchartgui/pybootchartgui/parsing.py +++ b/scripts/pybootchartgui/pybootchartgui/parsing.py | |||
@@ -18,7 +18,7 @@ import string | |||
18 | import re | 18 | import re |
19 | import sys | 19 | import sys |
20 | import tarfile | 20 | import tarfile |
21 | from time import clock | 21 | import time |
22 | from collections import defaultdict | 22 | from collections import defaultdict |
23 | from functools import reduce | 23 | from functools import reduce |
24 | 24 | ||
@@ -723,7 +723,7 @@ def get_num_cpus(headers): | |||
723 | 723 | ||
724 | def _do_parse(writer, state, filename, file): | 724 | def _do_parse(writer, state, filename, file): |
725 | writer.info("parsing '%s'" % filename) | 725 | writer.info("parsing '%s'" % filename) |
726 | t1 = clock() | 726 | t1 = time.process_time() |
727 | name = os.path.basename(filename) | 727 | name = os.path.basename(filename) |
728 | if name == "proc_diskstats.log": | 728 | if name == "proc_diskstats.log": |
729 | state.disk_stats = _parse_proc_disk_stat_log(file) | 729 | state.disk_stats = _parse_proc_disk_stat_log(file) |
@@ -743,7 +743,7 @@ def _do_parse(writer, state, filename, file): | |||
743 | state.monitor_disk = _parse_monitor_disk_log(file) | 743 | state.monitor_disk = _parse_monitor_disk_log(file) |
744 | elif not filename.endswith('.log'): | 744 | elif not filename.endswith('.log'): |
745 | _parse_bitbake_buildstats(writer, state, filename, file) | 745 | _parse_bitbake_buildstats(writer, state, filename, file) |
746 | t2 = clock() | 746 | t2 = time.process_time() |
747 | writer.info(" %s seconds" % str(t2-t1)) | 747 | writer.info(" %s seconds" % str(t2-t1)) |
748 | return state | 748 | return state |
749 | 749 | ||