From 533694fb33668ae402d3686b38426418e67e775c Mon Sep 17 00:00:00 2001 From: Tom Sparrow <793763+sparrowt@users.noreply.github.com> Date: Thu, 16 Nov 2023 13:28:31 +0000 Subject: [PATCH] Code formatting --- austin/stats.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/austin/stats.py b/austin/stats.py index 9f24b01..89d45d1 100644 --- a/austin/stats.py +++ b/austin/stats.py @@ -149,10 +149,14 @@ def parse(metrics: str, metric_type: Optional[MetricType] = None) -> List["Metri ms = [int(_) for _ in metrics.split(",")] if len(ms) == 3: return [ - Metric(MetricType.TIME, ms[0] if ms[1] == 0 else 0), # cpu time - Metric(MetricType.TIME, ms[0]), # wall time - Metric(MetricType.MEMORY, ms[2] if ms[2] >= 0 else 0), # memory allocation - Metric(MetricType.MEMORY, -ms[2] if ms[2] < 0 else 0), # memory deallocation + # CPU time + Metric(MetricType.TIME, ms[0] if ms[1] == 0 else 0), + # Wall time + Metric(MetricType.TIME, ms[0]), + # Memory allocation + Metric(MetricType.MEMORY, ms[2] if ms[2] >= 0 else 0), + # Memory deallocation + Metric(MetricType.MEMORY, -ms[2] if ms[2] < 0 else 0), ] elif len(ms) != 1: raise ValueError()