[PATCH] D68803: [LNT] Python 3 support: sort benchmark regressing

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 07:30:23 PST 2019


thopre updated this revision to Diff 232343.
thopre marked 2 inline comments as done.
thopre added a comment.

Add comment to explain assumptions


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68803/new/

https://reviews.llvm.org/D68803

Files:
  lnt/server/db/regression.py
  tests/server/ui/change_processing.py


Index: tests/server/ui/change_processing.py
===================================================================
--- tests/server/ui/change_processing.py
+++ tests/server/ui/change_processing.py
@@ -212,7 +212,8 @@
         session.commit()
 
         r2 = rebuild_title(session, ts_db, self.regression)
-        expected_title = "Regression of 6 benchmarks: foo, bar"
+        # The list of benchmark regressing is guaranteed to be sorted.
+        expected_title = "Regression of 6 benchmarks: bar, foo"
         self.assertEqual(r2.title, expected_title)
 
     def test_regression_evolution(self):
Index: lnt/server/db/regression.py
===================================================================
--- lnt/server/db/regression.py
+++ lnt/server/db/regression.py
@@ -71,7 +71,7 @@
             fc = ri.field_change
             benchmarks.add(shortname(fc.test.name))
         FMT = "Regression of {} benchmarks: {}"
-        title = FMT.format(new_size, ', '.join(benchmarks))
+        title = FMT.format(new_size, ', '.join(sorted(benchmarks)))
         # Crop long titles.
         title = (title[:120] + '...') if len(title) > 120 else title
         regression.title = title


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68803.232343.patch
Type: text/x-patch
Size: 1185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191205/dadce80c/attachment.bin>


More information about the llvm-commits mailing list