tools/android/appstats.py
def __PrintArrayWithDeltas(self, results, old_results, precision=2):
    """Helper method to return a string of statistics with their deltas.  This
    takes two arrays and prints out "current (current - old)" for all entries in
    the arrays."""
    if not results:
      return
    deltas = [0] * len(results)
    if old_results:
      assert len(old_results) == len(results)
      deltas = list(map(sub, results, old_results))
    output = ''
    for idx, val in enumerate(results):
      round_val = self.__CleanRound(val, precision)
      round_delta = self.__CleanRound(deltas[idx], precision)
      output += self.__PadString(str(round_val), 8, True) + ' '
      output += self.__PadAndColor('(' + str(round_delta) + ')', 8, False,
          self.__GetDiffColor(deltas[idx]))

    return output
Helper method to return a string of statistics with their deltas.  This
    takes two arrays and prints out "current (current - old)" for all entries in
    the arrays.
Helper method to return a string of statistics with their deltas.  This
takes two arrays and prints out "current (current - old)" for all entries in
the arrays.
Helper method to return a string of statistics with their deltas . This takes two arrays and prints out " current ( current - old ) " for all entries in the arrays .
def __PrintArrayWithDeltas(self, results, old_results, precision=2):
    if not results:
      return
    deltas = [0] * len(results)
    if old_results:
      assert len(old_results) == len(results)
      deltas = list(map(sub, results, old_results))
    output = ''
    for idx, val in enumerate(results):
      round_val = self.__CleanRound(val, precision)
      round_delta = self.__CleanRound(deltas[idx], precision)
      output += self.__PadString(str(round_val), 8, True) + ' '
      output += self.__PadAndColor('(' + str(round_delta) + ')', 8, False,
          self.__GetDiffColor(deltas[idx]))
    return output
def __PrintArrayWithDeltas ( self , results , old_results , precision = 2 ) : if not results : return deltas = [ 0 ] * len ( results ) if old_results : assert len ( old_results ) == len ( results ) deltas = list ( map ( sub , results , old_results ) ) output = '' for idx , val in enumerate ( results ) : round_val = self . __CleanRound ( val , precision ) round_delta = self . __CleanRound ( deltas [ idx ] , precision ) output += self . __PadString ( str ( round_val ) , 8 , True ) + ' ' output += self . __PadAndColor ( '(' + str ( round_delta ) + ')' , 8 , False , self . __GetDiffColor ( deltas [ idx ] ) ) return output
Helper method to return a string of statistics with their deltas.
Helper method to return a string of statistics with their deltas .
"""Helper method to return a string of statistics with their deltas.  This
    takes two arrays and prints out "current (current - old)" for all entries in
    the arrays."""
self
results
old_results
precision