Class OverallStatsImpl
java.lang.Object
com.biglybt.core.global.GlobalManagerAdapter
com.biglybt.core.stats.transfer.impl.OverallStatsImpl
- All Implemented Interfaces:
GlobalManagerListener, GeneralStats, OverallStats
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Coreprivate DHT[](package private) final GlobalManagerStatsprivate longprivate longprivate longprivate longprivate longprivate longprivate longprivate long[]private longprivate longprivate longprivate longprivate longprivate longprivate static final intprivate static final intprivate final longprivate static final intprotected final AEMonitorprivate intprivate longprivate longprivate longprivate longprivate longprivate longprivate longprivate longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintintgetAverageDownloadSpeed(boolean since_mark) intintgetAverageUploadSpeed(boolean since_mark) longlonggetDownloadedBytes(boolean since_mark) Method variants that can return values relative to the last markprotected long[]protected longlonglonglonglonggetTotalUpTime(boolean since_mark) longlonggetUploadedBytes(boolean since_mark) private Mapload()private Mapprivate voidprivate voidvoidsetMark()Sets a mark against the overall up/down/uptime so that the methods that report relative to the mark return values relative to itprivate voidupdateStats(boolean force) private voidvalidateAndLoadValues(Map statisticsMap) Methods inherited from class GlobalManagerAdapter
destroyed, downloadManagerAdded, downloadManagerRemoved, seedingStatusChangedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GlobalManagerListener
destroyInitiated
-
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
-
gm_stats
-
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
-
tick_count
private int tick_count
-
-
Constructor Details
-
OverallStatsImpl
-
-
Method Details
-
load
-
load
-
save
-
save
-
validateAndLoadValues
-
getLong
-
getAverageDownloadSpeed
public int getAverageDownloadSpeed()- Specified by:
getAverageDownloadSpeedin interfaceGeneralStats- Returns:
- the average download speed in bytes per second
-
getAverageUploadSpeed
public int getAverageUploadSpeed()- Specified by:
getAverageUploadSpeedin interfaceGeneralStats- Returns:
- the average upload speed in bytes per second
-
getDownloadedBytes
public long getDownloadedBytes()- Specified by:
getDownloadedBytesin interfaceGeneralStats- Returns:
- the number of downloaded bytes
-
getUploadedBytes
public long getUploadedBytes()- Specified by:
getUploadedBytesin interfaceGeneralStats- Returns:
- the number of uploaded bytes
-
getTotalUpTime
public long getTotalUpTime()- Specified by:
getTotalUpTimein interfaceGeneralStats- Returns:
- the total lifetime 'up time' in seconds
-
getDownloadedBytes
public long getDownloadedBytes(boolean since_mark) Description copied from interface:GeneralStatsMethod variants that can return values relative to the last mark- Specified by:
getDownloadedBytesin interfaceGeneralStats- Parameters:
since_mark-- Returns:
-
getUploadedBytes
public long getUploadedBytes(boolean since_mark) - Specified by:
getUploadedBytesin interfaceGeneralStats
-
getTotalUpTime
public long getTotalUpTime(boolean since_mark) - Specified by:
getTotalUpTimein interfaceGeneralStats
-
getAverageDownloadSpeed
public int getAverageDownloadSpeed(boolean since_mark) - Specified by:
getAverageDownloadSpeedin interfaceGeneralStats
-
getAverageUploadSpeed
public int getAverageUploadSpeed(boolean since_mark) - Specified by:
getAverageUploadSpeedin interfaceGeneralStats
-
getMarkTime
public long getMarkTime()- Specified by:
getMarkTimein interfaceGeneralStats
-
setMark
public void setMark()Description copied from interface:GeneralStatsSets 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:
setMarkin interfaceGeneralStats
-
clearMark
public void clearMark()- Specified by:
clearMarkin interfaceGeneralStats
-
getSessionUpTime
public long getSessionUpTime()- Specified by:
getSessionUpTimein interfaceGeneralStats- Returns:
- this session uptime in seconds
-
destroyInitiated
public void destroyInitiated()- Specified by:
destroyInitiatedin interfaceGlobalManagerListener
-
getLastSnapshot
protected long[] getLastSnapshot() -
updateStats
private void updateStats(boolean force)
-