Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: tools/ignition/bytecode_dispatches_report_test.py

Issue 2159683003: [interpreter] Add relative numbers to dispatch report (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: refactor from comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 523dac2960d8da5e0d2ca9f31288e6201a80b041..0a4e3e9be775a124f059838f5e6368c62b64e12e 100644
--- a/tools/ignition/bytecode_dispatches_report_test.py
+++ b/tools/ignition/bytecode_dispatches_report_test.py
@@ -43,12 +43,18 @@ class BytecodeDispatchesReportTest(unittest.TestCase):
])
def test_find_top_dispatch_sources(self):
- top_dispatch_sources = bdr.find_top_dispatch_sources({
- "a": {"a": 10, "b": 8, "c": 7},
+ d = {
+ "a": {"a": 4, "b": 2, "c": 4},
"b": {"a": 1, "c": 4},
- "c": {"a": 42, "b": 12, "c": 99}
- }, "b", 10)
- self.assertListEqual(top_dispatch_sources, [
- ("c", 12),
- ("a", 8)
+ "c": {"a": 40, "b": 10, "c": 50}
+ }
+ top_sources, top_destinations = bdr.find_top_dispatch_sources(d, "b", 10, False)
+ self.assertListEqual(top_sources, [
+ ("c", (10, 0.1)),
+ ("a", (2, 0.2))
+ ])
+ top_sources, top_destinations = bdr.find_top_dispatch_sources(d, "b", 10, True)
+ self.assertListEqual(top_sources, [
+ ("a", (2, 0.2)),
+ ("c", (10, 0.1))
])
« tools/ignition/bytecode_dispatches_report.py ('K') | « tools/ignition/bytecode_dispatches_report.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698