diff --git a/perf-postprocess.py b/perf-postprocess.py index aa66b96..a4a996f 100644 --- a/perf-postprocess.py +++ b/perf-postprocess.py @@ -552,9 +552,11 @@ def extract_dataframe(perf_data_lines, meta_data, perf_mode): # fix metric name X.1, X.2, etc -> just X perf_data_df["metric"] = perf_data_df.apply( - lambda x: ".".join(x["metric"].split(".")[:-1]) - if len(re.findall(r"^[0-9]*$", x["metric"].split(".")[-1])) > 0 - else x["metric"], + lambda x: ( + ".".join(x["metric"].split(".")[:-1]) + if len(re.findall(r"^[0-9]*$", x["metric"].split(".")[-1])) > 0 + else x["metric"] + ), axis=1, ) @@ -1026,9 +1028,7 @@ def generate_metrics( + ( "System" if perf_mode == Mode.System - else "CPU" - if perf_mode == Mode.CPU - else "Socket" + else "CPU" if perf_mode == Mode.CPU else "Socket" ) + " mode" ) diff --git a/requirements.txt b/requirements.txt index 790b011..1b4aa88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -black==22.8.0 +black==24.8.0 flake8 pytype simpleeval diff --git a/src/perf_helpers.py b/src/perf_helpers.py index 69cc2a0..19e0638 100644 --- a/src/perf_helpers.py +++ b/src/perf_helpers.py @@ -148,7 +148,7 @@ def nmi_watchdog_enabled(): return None try: nmi_watchdog_status = int(proc_output.decode().strip()) - except (ValueError) as e: + except ValueError as e: logging.warning(f"Failed to interpret nmi_watchdog status: {e}") return None return nmi_watchdog_status == 1