vprof/code_heatmap.py
def _calc_skips(self, heatmap, num_lines):
        """Calculates skip map for large sources.
        Skip map is a list of tuples where first element of tuple is line
        number and second is length of the skip region:
            [(1, 10), (15, 10)] means skipping 10 lines after line 1 and
            10 lines after line 15.
        """
        if num_lines < self.MIN_SKIP_SIZE:
            return []
        skips, prev_line = [], 0
        for line in sorted(heatmap):
            curr_skip = line - prev_line - 1
            if curr_skip > self.SKIP_LINES:
                skips.append((prev_line, curr_skip))
            prev_line = line
        if num_lines - prev_line > self.SKIP_LINES:
            skips.append((prev_line, num_lines - prev_line))
        return skips
def _calc_skips(self, heatmap, num_lines):
        """Calculates skip map for large sources.
        Skip map is a list of tuples where first element of tuple is line
        number and second is length of the skip region:
            [(1, 10), (15, 10)] means skipping 10 lines after line 1 and
            10 lines after line 15.
        """
        if num_lines < self.MIN_SKIP_SIZE:
            return []
        skips, prev_line = [], 0
        for line in sorted(heatmap):
            curr_skip = line - prev_line - 1
            if curr_skip > self.SKIP_LINES:
                skips.append((prev_line, curr_skip))
            prev_line = line
        if num_lines - prev_line > self.SKIP_LINES:
            skips.append((prev_line, num_lines - prev_line))
        return skips
def _calc_skips ( self , heatmap , num_lines ) : if num_lines < self . MIN_SKIP_SIZE : return [ ] skips , prev_line = [ ] , 0 for line in sorted ( heatmap ) : curr_skip = line - prev_line - 1 if curr_skip > self . SKIP_LINES : skips . append ( ( prev_line , curr_skip ) ) prev_line = line if num_lines - prev_line > self . SKIP_LINES : skips . append ( ( prev_line , num_lines - prev_line ) ) return skips
Calculates skip map for large sources.
        Skip map is a list of tuples where first element of tuple is line
        number and second is length of the skip region:
            [(1, 10), (15, 10)] means skipping 10 lines after line 1 and
            10 lines after line 15.
Calculates skip map for large sources . Skip map is a list of tuples where first element of tuple is line number and second is length of the skip region : [ ( 1 10 ) ( 15 10 ) ] means skipping 10 lines after line 1 and 10 lines after line 15 .