tools/android/appstats.py
def __PrintStatsHelper(self,
                         pid,
                         snapshot,
                         prev_snapshot,
                         show_labels,
                         show_timestamp,
                         show_mem,
                         show_net):
    """Helper method to concat various stats entries together into one line.
    This will line up with a header built by __PrintHeaderHelper if the same
    values are passed to it."""
    stats = []
    if show_labels:
      stats.append(self.__PrintPidLabelStats(pid, snapshot))

    if show_timestamp:
      stats.append(self.__PrintTimestampStats(snapshot))

    if show_mem:
      stats.append(self.__PrintMemoryStats(pid, snapshot, prev_snapshot))

    if show_net:
      userid = snapshot.GetUserIdForPid(pid)
      show_userid = snapshot.IsFirstPidForUserId(pid)
      if userid and show_userid:
        stats.append(self.__PrintNetworkStats(userid, snapshot, prev_snapshot))
      else:
        stats.append(self.__PrintNulledNetworkStats())

    return ' '.join(stats)
Helper method to concat various stats entries together into one line.
    This will line up with a header built by __PrintHeaderHelper if the same
    values are passed to it.
Helper method to concat various stats entries together into one line.
This will line up with a header built by __PrintHeaderHelper if the same
values are passed to it.
Helper method to concat various stats entries together into one line . This will line up with a header built by __PrintHeaderHelper if the same values are passed to it .
def __PrintStatsHelper(self,
                         pid,
                         snapshot,
                         prev_snapshot,
                         show_labels,
                         show_timestamp,
                         show_mem,
                         show_net):
    stats = []
    if show_labels:
      stats.append(self.__PrintPidLabelStats(pid, snapshot))
    if show_timestamp:
      stats.append(self.__PrintTimestampStats(snapshot))
    if show_mem:
      stats.append(self.__PrintMemoryStats(pid, snapshot, prev_snapshot))
    if show_net:
      userid = snapshot.GetUserIdForPid(pid)
      show_userid = snapshot.IsFirstPidForUserId(pid)
      if userid and show_userid:
        stats.append(self.__PrintNetworkStats(userid, snapshot, prev_snapshot))
      else:
        stats.append(self.__PrintNulledNetworkStats())
    return ' '.join(stats)
def __PrintStatsHelper ( self , pid , snapshot , prev_snapshot , show_labels , show_timestamp , show_mem , show_net ) : stats = [ ] if show_labels : stats . append ( self . __PrintPidLabelStats ( pid , snapshot ) ) if show_timestamp : stats . append ( self . __PrintTimestampStats ( snapshot ) ) if show_mem : stats . append ( self . __PrintMemoryStats ( pid , snapshot , prev_snapshot ) ) if show_net : userid = snapshot . GetUserIdForPid ( pid ) show_userid = snapshot . IsFirstPidForUserId ( pid ) if userid and show_userid : stats . append ( self . __PrintNetworkStats ( userid , snapshot , prev_snapshot ) ) else : stats . append ( self . __PrintNulledNetworkStats ( ) ) return ' ' . join ( stats )
Helper method to concat various stats entries together into one line.
Helper method to concat various stats entries together into one line .
"""Helper method to concat various stats entries together into one line.
    This will line up with a header built by __PrintHeaderHelper if the same
    values are passed to it."""
self
pid
snapshot
prev_snapshot
show_labels
show_timestamp
show_mem
show_net