aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2022-01-28 15:04:19 +0530
committerPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2022-01-28 15:04:19 +0530
commit17bc2fb722735fb01d416740c422bce1793d7550 (patch)
tree61e3322f2560692853fefbc9b4435c44d86fa334
parentda7f61cb24885ad50cf3a31fcb60139c0f0ba876 (diff)
merge-metric-csvs.py: Fix order of symbols in output csv.
Change-Id: I1430b5a7d0c63d043a643a9243073f4d27b9ffa5
-rwxr-xr-xmerge-metric-csvs.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/merge-metric-csvs.py b/merge-metric-csvs.py
index 032cdc4..27e7c04 100755
--- a/merge-metric-csvs.py
+++ b/merge-metric-csvs.py
@@ -37,8 +37,14 @@ def main():
for metric in default_metric_values.keys():
result[metric] = result[metric].fillna(default_metric_values[metric], downcast="infer")
- # Sort according to benchmark, so that we get all the entries for same benchmark contiguously.
- result = result.sort_values("benchmark")
+ # Sort in ascending order w.r.t benchmark, and then sort in
+ # descending order w.r.t sample.
+ # So, the output is:
+ # (1) All symbols belonging to same benchmark are ordered contiguously.
+ # (2) All symbols within the same benchmark are ordered in descending order
+ # w.r.t samples.
+
+ result = result.sort_values(["benchmark", "sample"], ascending=[True, False])
result.to_csv(sys.stdout, index=False)
if __name__ == "__main__":