Example #1
0
 def test_calculate_samples_count_per_handler_(self):
   counters = ipr.calculate_samples_count_per_handler([
     ["foo", "BytecodeHandler:bar"],
     ["foo", "BytecodeHandler:bar"],
     ["beep", "BytecodeHandler:bar"],
   ])
   self.assertItemsEqual(counters, [("bar", 3)])
Example #2
0
 def test_calculate_samples_count_per_handler_show_compile(self):
   counters = ipr.calculate_samples_count_per_handler([
     ["foo", "BytecodeHandler:bar"],
     ["foo", "BytecodeHandler:bar"],
     ["beep", "BytecodeHandler:bar"],
     ["hello", "v8::internal::Compiler", "[compiler]"],
   ])
   self.assertItemsEqual(counters, [
     ("bar", 3),
     ("[compiler]", 1)
   ])