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..21aa675db3e0ea856d42730f30036082bdd9dfdc 100644 |
--- a/tools/ignition/bytecode_dispatches_report_test.py |
+++ b/tools/ignition/bytecode_dispatches_report_test.py |
@@ -8,7 +8,7 @@ import unittest |
class BytecodeDispatchesReportTest(unittest.TestCase): |
def test_find_top_counters(self): |
- top_counters = bdr.find_top_counters({ |
+ top_counters = bdr.find_top_bytecode_dispatch_pairs({ |
"a": {"a": 10, "b": 8, "c": 99}, |
"b": {"a": 1, "b": 4, "c": 1}, |
"c": {"a": 42, "b": 3, "c": 7}}, 5) |
@@ -29,3 +29,15 @@ class BytecodeDispatchesReportTest(unittest.TestCase): |
[10, 8, 7]]).all()) |
self.assertListEqual(xlabels, ['a', 'b', 'c']) |
self.assertListEqual(ylabels, ['c', 'b', 'a']) |
+ |
+ def test_find_top_bytecodes(self): |
+ top_dispatch_sources = bdr.find_top_bytecodes({ |
+ "a": {"a": 10, "b": 8, "c": 7}, |
+ "b": {"a": 1, "c": 4}, |
+ "c": {"a": 42, "b": 12, "c": 99} |
+ }) |
+ self.assertListEqual(top_dispatch_sources, [ |
+ ('c', 153), |
+ ('a', 25), |
+ ('b', 5) |
+ ]) |