scripts: Fixed -s/-S sorting of .csv/.json outputs
I'm not sure if this was ever implemented, or broken during a refactor, but we were ignoring -s/-S flags when writing .csv/.json output with -o/-O. Curious, because the functionality _was_ implemented in fold, just unused. All this required was passing -s/-S to fold correctly. Note we _don't_ sort diff_results, because these are never written to .csv/.json output. At some point this behavior may have been a bit more questionable, since we use to allow mixing -o/-O and table rendering. But now that -o/-O is considered an exclusive operation, ignoring -s/-S doesn't really make sense. --- Why did this come up? Well imagine my frustration when: 1. In tikz/pgfplots, \addplot table only really works with sorted data 2. csv.py has a -s/-S flag for sorting! 3. -s/-S doesn't work!
This commit is contained in:
+2
-1
@@ -1090,7 +1090,8 @@ def main(obj_paths, *,
|
|||||||
# fold
|
# fold
|
||||||
results = fold(CodeResult, results,
|
results = fold(CodeResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines)
|
defines=defines,
|
||||||
|
sort=sort)
|
||||||
|
|
||||||
# find previous results?
|
# find previous results?
|
||||||
diff_results = None
|
diff_results = None
|
||||||
|
|||||||
+2
-1
@@ -1050,7 +1050,8 @@ def main(gcda_paths, *,
|
|||||||
# fold
|
# fold
|
||||||
results = fold(CovResult, results,
|
results = fold(CovResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines)
|
defines=defines,
|
||||||
|
sort=sort)
|
||||||
|
|
||||||
# find previous results?
|
# find previous results?
|
||||||
diff_results = None
|
diff_results = None
|
||||||
|
|||||||
@@ -2438,6 +2438,7 @@ def main(csv_paths, *,
|
|||||||
# fold
|
# fold
|
||||||
results = fold(Result, results,
|
results = fold(Result, results,
|
||||||
by=by,
|
by=by,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
@@ -1370,6 +1370,7 @@ def main(obj_paths, *,
|
|||||||
results = fold(CtxResult, results,
|
results = fold(CtxResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines,
|
defines=defines,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
+2
-1
@@ -1090,7 +1090,8 @@ def main(obj_paths, *,
|
|||||||
# fold
|
# fold
|
||||||
results = fold(DataResult, results,
|
results = fold(DataResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines)
|
defines=defines,
|
||||||
|
sort=sort)
|
||||||
|
|
||||||
# find previous results?
|
# find previous results?
|
||||||
diff_results = None
|
diff_results = None
|
||||||
|
|||||||
@@ -1588,6 +1588,7 @@ def main_(perf_paths, *,
|
|||||||
results = fold(PerfResult, results,
|
results = fold(PerfResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines,
|
defines=defines,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
@@ -1584,6 +1584,7 @@ def main_(paths, *,
|
|||||||
results = fold(PerfBdResult, results,
|
results = fold(PerfBdResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines,
|
defines=defines,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
@@ -1108,6 +1108,7 @@ def main(ci_paths,
|
|||||||
results = fold(StackResult, results,
|
results = fold(StackResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines,
|
defines=defines,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
@@ -1259,6 +1259,7 @@ def main(obj_paths, *,
|
|||||||
results = fold(StructResult, results,
|
results = fold(StructResult, results,
|
||||||
by=by,
|
by=by,
|
||||||
defines=defines,
|
defines=defines,
|
||||||
|
sort=sort,
|
||||||
depth=depth)
|
depth=depth)
|
||||||
|
|
||||||
# hotify?
|
# hotify?
|
||||||
|
|||||||
Reference in New Issue
Block a user