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

Unified Diff: tools/ignition/bytecode_dispatches_report_test.py

Issue 1875263004: [Interpreter] Report hottest bytecodes in bytecode_dispatches_report.py (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@viz-count-h2h
Patch Set: Use dashes instead of underscores, improve help text. Created 4 years, 8 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 c31bb862cba88d59b63958927dce25f17174bcd4..c4ffb33ece9de7c8008a9040c5827ca2ffbfb1ac 100644
--- a/tools/ignition/bytecode_dispatches_report_test.py
+++ b/tools/ignition/bytecode_dispatches_report_test.py
@@ -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_dispatch_sources(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)
+ ])
« 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