def test_calculate_samples_count_per_callchain(self): counters = ipr.calculate_samples_count_per_callchain([ ["foo", "BytecodeHandler:bar"], ["foo", "BytecodeHandler:bar"], ["beep", "BytecodeHandler:bar"], ]) self.assertItemsEqual(counters, [ ('BytecodeHandler:bar;foo', 2), ('BytecodeHandler:bar;beep', 1), ])
def test_calculate_samples_count_per_callchain(self): counters = ipr.calculate_samples_count_per_callchain([ ["foo", "BytecodeHandler:bar"], ["foo", "BytecodeHandler:bar"], ["beep", "BytecodeHandler:bar"], ["hello", "v8::internal::Compiler", "[compiler]"], ]) self.assertItemsEqual(counters, [ ('BytecodeHandler:bar;foo', 2), ('BytecodeHandler:bar;beep', 1), ('[compiler];v8::internal::Compiler;hello', 1), ])