Class OverallStatsImpl

java.lang.Object
com.biglybt.core.global.GlobalManagerAdapter
com.biglybt.core.stats.transfer.impl.OverallStatsImpl
All Implemented Interfaces:
GlobalManagerListener, GeneralStats, OverallStats

public class OverallStatsImpl extends GlobalManagerAdapter implements OverallStats
  • Field Details

    • STATS_PERIOD

      private static final int STATS_PERIOD
      See Also:
    • SAVE_PERIOD

      private static final int SAVE_PERIOD
      See Also:
    • SAVE_TICKS

      private static final int SAVE_TICKS
      See Also:
    • core

      final Core core
    • gm_stats

      final GlobalManagerStats gm_stats
    • dhts

      private DHT[] dhts
    • totalDownloaded

      private long totalDownloaded
    • totalUploaded

      private long totalUploaded
    • totalUptime

      private long totalUptime
    • markTime

      private long markTime
    • markTotalDownloaded

      private long markTotalDownloaded
    • markTotalUploaded

      private long markTotalUploaded
    • markTotalUptime

      private long markTotalUptime
    • totalDHTUploaded

      private long totalDHTUploaded
    • totalDHTDownloaded

      private long totalDHTDownloaded
    • lastDownloaded

      private long lastDownloaded
    • lastUploaded

      private long lastUploaded
    • lastUptime

      private long lastUptime
    • lastDHTUploaded

      private long lastDHTUploaded
    • lastDHTDownloaded

      private long lastDHTDownloaded
    • totalProtocolUploaded

      private long totalProtocolUploaded
    • totalDataUploaded

      private long totalDataUploaded
    • totalProtocolDownloaded

      private long totalProtocolDownloaded
    • totalDataDownloaded

      private long totalDataDownloaded
    • lastProtocolUploaded

      private long lastProtocolUploaded
    • lastDataUploaded

      private long lastDataUploaded
    • lastProtocolDownloaded

      private long lastProtocolDownloaded
    • lastDataDownloaded

      private long lastDataDownloaded
    • lastSnapshot

      private long[] lastSnapshot
    • session_start_time

      private final long session_start_time
    • this_mon

      protected final AEMonitor this_mon
    • tick_count

      private int tick_count
  • Constructor Details

  • Method Details

    • load

      private Map load(String filename)
    • load

      private Map load()
    • save

      private void save(String filename, Map map)
    • save

      private void save(Map map)
    • validateAndLoadValues

      private void validateAndLoadValues(Map statisticsMap)
    • getLong

      protected long getLong(Map map, String name)
    • getAverageDownloadSpeed

      public int getAverageDownloadSpeed()
      Specified by:
      getAverageDownloadSpeed in interface GeneralStats
      Returns:
      the average download speed in bytes per second
    • getAverageUploadSpeed

      public int getAverageUploadSpeed()
      Specified by:
      getAverageUploadSpeed in interface GeneralStats
      Returns:
      the average upload speed in bytes per second
    • getDownloadedBytes

      public long getDownloadedBytes()
      Specified by:
      getDownloadedBytes in interface GeneralStats
      Returns:
      the number of downloaded bytes
    • getUploadedBytes

      public long getUploadedBytes()
      Specified by:
      getUploadedBytes in interface GeneralStats
      Returns:
      the number of uploaded bytes
    • getTotalUpTime

      public long getTotalUpTime()
      Specified by:
      getTotalUpTime in interface GeneralStats
      Returns:
      the total lifetime 'up time' in seconds
    • getDownloadedBytes

      public long getDownloadedBytes(boolean since_mark)
      Description copied from interface: GeneralStats
      Method variants that can return values relative to the last mark
      Specified by:
      getDownloadedBytes in interface GeneralStats
      Parameters:
      since_mark -
      Returns:
    • getUploadedBytes

      public long getUploadedBytes(boolean since_mark)
      Specified by:
      getUploadedBytes in interface GeneralStats
    • getTotalUpTime

      public long getTotalUpTime(boolean since_mark)
      Specified by:
      getTotalUpTime in interface GeneralStats
    • getAverageDownloadSpeed

      public int getAverageDownloadSpeed(boolean since_mark)
      Specified by:
      getAverageDownloadSpeed in interface GeneralStats
    • getAverageUploadSpeed

      public int getAverageUploadSpeed(boolean since_mark)
      Specified by:
      getAverageUploadSpeed in interface GeneralStats
    • getMarkTime

      public long getMarkTime()
      Specified by:
      getMarkTime in interface GeneralStats
    • setMark

      public void setMark()
      Description copied from interface: GeneralStats
      Sets a mark against the overall up/down/uptime so that the methods that report relative to the mark return values relative to it
      Specified by:
      setMark in interface GeneralStats
    • clearMark

      public void clearMark()
      Specified by:
      clearMark in interface GeneralStats
    • getSessionUpTime

      public long getSessionUpTime()
      Specified by:
      getSessionUpTime in interface GeneralStats
      Returns:
      this session uptime in seconds
    • destroyInitiated

      public void destroyInitiated()
      Specified by:
      destroyInitiated in interface GlobalManagerListener
    • getLastSnapshot

      protected long[] getLastSnapshot()
    • updateStats

      private void updateStats(boolean force)