tools/mac/power/collapse_profile_test.py
def testCompoundSyntheticMarker(self):
    """Tests that when more than one frame of interest is found the correct
    compound synthetic frame is added to the bottom of the stack."""

    samples = [{'frames': ['foo', 'bar', 'viz', '::network'], 'weight': 24}]

    # Stack will be augmented with mojo marker
    augmented_stack = samples.copy()
    augmented_stack[0]["frames"] = ['mojo::viz::'
                                    ] + augmented_stack[0]["frames"]

    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(augmented_stack, stack_collapser.samples)
Tests that when more than one frame of interest is found the correct
    compound synthetic frame is added to the bottom of the stack.
Tests that when more than one frame of interest is found the correct
compound synthetic frame is added to the bottom of the stack.
Tests that when more than one frame of interest is found the correct compound synthetic frame is added to the bottom of the stack .
def testCompoundSyntheticMarker(self):
    samples = [{'frames': ['foo', 'bar', 'viz', '::network'], 'weight': 24}]
    augmented_stack = samples.copy()
    augmented_stack[0]["frames"] = ['mojo::viz::'
                                    ] + augmented_stack[0]["frames"]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(augmented_stack, stack_collapser.samples)
def testCompoundSyntheticMarker ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , 'viz' , '::network' ] , 'weight' : 24 } ] augmented_stack = samples . copy ( ) augmented_stack [ 0 ] [ "frames" ] = [ 'mojo::viz::' ] + augmented_stack [ 0 ] [ "frames" ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) stack_collapser . post_process_samples ( ) self . assertEquals ( augmented_stack , stack_collapser . samples )
Tests that when more than one frame of interest is found the correct
compound synthetic frame is added to the bottom of the stack.
Tests that when more than one frame of interest is found the correct compound synthetic frame is added to the bottom of the stack .
"""Tests that when more than one frame of interest is found the correct
    compound synthetic frame is added to the bottom of the stack.""" # Stack will be augmented with mojo marker
self