Add the rebuilt modules to the benchmark formatting
Test: format_benchmarks
Change-Id: Ib3fffc99a1c66a2f700c27821886e8de2e2ec041
diff --git a/tools/perf/pretty.py b/tools/perf/pretty.py
index 1b59098..14fdc9e 100644
--- a/tools/perf/pretty.py
+++ b/tools/perf/pretty.py
@@ -19,7 +19,7 @@
SEPARATOR = Sentinel()
-def FormatTable(data, prefix=""):
+def FormatTable(data, prefix="", alignments=[]):
"""Pretty print a table.
Prefixes each row with `prefix`.
@@ -40,10 +40,10 @@
else:
for i in range(len(row)):
cell = row[i] if row[i] else ""
- if i != 0:
+ if i >= len(alignments) or alignments[i] == "R":
result += " " * (widths[i] - len(cell))
result += cell
- if i == 0:
+ if i < len(alignments) and alignments[i] == "L":
result += " " * (widths[i] - len(cell))
result += colsep
result += "\n"