Index: tools/ignition/bytecode_dispatches_report_test.py |
diff --git a/tools/ignition/bytecode_dispatches_report_test.py b/tools/ignition/bytecode_dispatches_report_test.py |
index c31bb862cba88d59b63958927dce25f17174bcd4..ee76a4aac7c14637959568d99bcbb58e049c21de 100644 |
--- a/tools/ignition/bytecode_dispatches_report_test.py |
+++ b/tools/ignition/bytecode_dispatches_report_test.py |
@@ -29,3 +29,10 @@ class BytecodeDispatchesReportTest(unittest.TestCase): |
[10, 8, 7]]).all()) |
self.assertListEqual(xlabels, ['a', 'b', 'c']) |
self.assertListEqual(ylabels, ['c', 'b', 'a']) |
+ |
+ def test_find_top_dispatch_sources(self): |
+ top_dispatch_sources = bdr.find_top_dispatch_sources({ |
+ "a": {"a": 10, "b": 8, "c": 7}, |
+ "b": {"a": 1, "c": 4}, |
+ "c": {"a": 42, "b": 12, "c": 99}}, 2) |
+ self.assertListEqual(top_dispatch_sources, [('c', 153), ('a', 25)]) |