Class GlobalManagerStatsImpl
java.lang.Object
com.biglybt.core.global.impl.GlobalManagerStatsImpl
- All Implemented Interfaces:
GlobalManagerStats, SimpleTimer.TimerTickReceiver
public class GlobalManagerStatsImpl
extends Object
implements GlobalManagerStats, SimpleTimer.TimerTickReceiver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classprivate classprivate static classprivate static classprivate static classNested classes/interfaces inherited from interface GlobalManagerStats
GlobalManagerStats.AggregateStats, GlobalManagerStats.CountryDetails, GlobalManagerStats.RemoteCountryStats, GlobalManagerStats.RemoteStats -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String, GlobalManagerStats.CountryDetails> private AtomicIntegerprivate Stringprivate intprivate intprivate final Averageprivate final Averageprivate final Averageprivate longprivate final Averageprivate DHTprivate static final Objectprivate final GlobalManagerImplprivate static final longprivate static final Objectprivate static final Objectprivate static final Objectprivate final Averageprivate final Averageprivate final Averageprivate final Averageprivate Map<DownloadManager, List<PEPeer>> private intprivate longprivate longprivate GeneralUtils.SmoothAverageprivate GeneralUtils.SmoothAverageprivate AsyncDispatcherprivate Set<InetAddress> private static final longprivate static final longprivate longprivate longprivate longprivate longprivate longprivate longprivate long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedGlobalManagerStatsImpl(GlobalManagerImpl _manager) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoiddataBytesReceived(long length, boolean LAN) voiddataBytesSent(long length, boolean LAN) voiddiscarded(int length) intintlongData Receive Rate over the last 10slonglonggetDataReceiveRateNoLAN(int average_period) longData Send Rate over the last 10slonglonglonggetDataSendRateNoLAN(int average_period) intintintgetProtocolReceiveRateNoLAN(int average_period) intintintgetProtocolSendRateNoLAN(int average_period) longSmoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" see @linkGeneralUtilsfor defaults and limitslongSmoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs", see @linkGeneralUtilsfor defaults and limitslonglonglonglonglonglonggetTotalSwarmsPeerRate(boolean downloading, boolean seeding) protected voidload()voidprotocolBytesReceived(long length, boolean LAN) voidprotocolBytesSent(long length, boolean LAN) voidprotected voidsave()voidtick(long mono_now, int tick_count) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GlobalManagerStats
getTotalDataProtocolBytesReceived, getTotalDataProtocolBytesSent
-
Field Details
-
manager
-
smooth_last_sent
private long smooth_last_sent -
smooth_last_received
private long smooth_last_received -
current_smoothing_window
private int current_smoothing_window -
current_smoothing_interval
private int current_smoothing_interval -
smoothed_receive_rate
-
smoothed_send_rate
-
total_data_bytes_received
private long total_data_bytes_received -
total_protocol_bytes_received
private long total_protocol_bytes_received -
totalDiscarded
private long totalDiscarded -
total_data_bytes_sent
private long total_data_bytes_sent -
total_protocol_bytes_sent
private long total_protocol_bytes_sent -
data_send_speed_at_close
private long data_send_speed_at_close -
data_receive_speed
-
protocol_receive_speed
-
data_receive_speed_no_lan
-
protocol_receive_speed_no_lan
-
data_send_speed
-
protocol_send_speed
-
data_send_speed_no_lan
-
protocol_send_speed_no_lan
-
PEER_DATA_INIT_KEY
-
PEER_DATA_KEY
-
PEER_DATA_FINAL_KEY
-
DOWNLOAD_DATA_KEY
-
removed_peers
-
country_details
-
country_total
-
country_details_seq
-
country_my_cc
-
stats_dispatcher
-
pending_stats
-
STATS_HISTORY_MAX_AGE
private static final long STATS_HISTORY_MAX_AGE- See Also:
-
STATS_HISTORY_MAX_SAMPLES
private static final long STATS_HISTORY_MAX_SAMPLES- See Also:
-
MAX_ALLOWED_BYTES_PER_MIN
private static final long MAX_ALLOWED_BYTES_PER_MIN- See Also:
-
aggregate_stats
-
sequence
private int sequence -
total_received_overall
private long total_received_overall -
total_sent_overall
private long total_sent_overall -
as_remote_latest
-
dht_biglybt
-
stats_history
-
stats_history_addresses
-
as_remote_wrapper
-
as_local_wrapper
-
-
Constructor Details
-
GlobalManagerStatsImpl
protected GlobalManagerStatsImpl() -
GlobalManagerStatsImpl
-
-
Method Details
-
load
protected void load() -
save
protected void save() -
getDataSendRateAtClose
public long getDataSendRateAtClose()- Specified by:
getDataSendRateAtClosein interfaceGlobalManagerStats
-
discarded
public void discarded(int length) - Specified by:
discardedin interfaceGlobalManagerStats
-
dataBytesReceived
public void dataBytesReceived(long length, boolean LAN) - Specified by:
dataBytesReceivedin interfaceGlobalManagerStats
-
protocolBytesReceived
public void protocolBytesReceived(long length, boolean LAN) - Specified by:
protocolBytesReceivedin interfaceGlobalManagerStats
-
dataBytesSent
public void dataBytesSent(long length, boolean LAN) - Specified by:
dataBytesSentin interfaceGlobalManagerStats
-
protocolBytesSent
public void protocolBytesSent(long length, boolean LAN) - Specified by:
protocolBytesSentin interfaceGlobalManagerStats
-
getDataReceiveRate
public long getDataReceiveRate()Description copied from interface:GlobalManagerStatsData Receive Rate over the last 10s- Specified by:
getDataReceiveRatein interfaceGlobalManagerStats
-
getDataReceiveRateNoLAN
public long getDataReceiveRateNoLAN()- Specified by:
getDataReceiveRateNoLANin interfaceGlobalManagerStats
-
getDataReceiveRateNoLAN
public long getDataReceiveRateNoLAN(int average_period) - Specified by:
getDataReceiveRateNoLANin interfaceGlobalManagerStats
-
getProtocolReceiveRate
public int getProtocolReceiveRate()- Specified by:
getProtocolReceiveRatein interfaceGlobalManagerStats
-
getProtocolReceiveRateNoLAN
public int getProtocolReceiveRateNoLAN()- Specified by:
getProtocolReceiveRateNoLANin interfaceGlobalManagerStats
-
getProtocolReceiveRateNoLAN
public int getProtocolReceiveRateNoLAN(int average_period) - Specified by:
getProtocolReceiveRateNoLANin interfaceGlobalManagerStats
-
getDataAndProtocolReceiveRate
public int getDataAndProtocolReceiveRate()- Specified by:
getDataAndProtocolReceiveRatein interfaceGlobalManagerStats
-
getDataSendRate
public long getDataSendRate()Description copied from interface:GlobalManagerStatsData Send Rate over the last 10s- Specified by:
getDataSendRatein interfaceGlobalManagerStats
-
getDataSendRateNoLAN
public long getDataSendRateNoLAN()- Specified by:
getDataSendRateNoLANin interfaceGlobalManagerStats
-
getDataSendRateNoLAN
public long getDataSendRateNoLAN(int average_period) - Specified by:
getDataSendRateNoLANin interfaceGlobalManagerStats
-
getProtocolSendRate
public int getProtocolSendRate()- Specified by:
getProtocolSendRatein interfaceGlobalManagerStats
-
getProtocolSendRateNoLAN
public int getProtocolSendRateNoLAN()- Specified by:
getProtocolSendRateNoLANin interfaceGlobalManagerStats
-
getProtocolSendRateNoLAN
public int getProtocolSendRateNoLAN(int average_period) - Specified by:
getProtocolSendRateNoLANin interfaceGlobalManagerStats
-
getDataAndProtocolSendRate
public int getDataAndProtocolSendRate()- Specified by:
getDataAndProtocolSendRatein interfaceGlobalManagerStats
-
getTotalDataBytesSent
public long getTotalDataBytesSent()- Specified by:
getTotalDataBytesSentin interfaceGlobalManagerStats
-
getTotalProtocolBytesSent
public long getTotalProtocolBytesSent()- Specified by:
getTotalProtocolBytesSentin interfaceGlobalManagerStats
-
getTotalDataBytesReceived
public long getTotalDataBytesReceived()- Specified by:
getTotalDataBytesReceivedin interfaceGlobalManagerStats
-
getTotalProtocolBytesReceived
public long getTotalProtocolBytesReceived()- Specified by:
getTotalProtocolBytesReceivedin interfaceGlobalManagerStats
-
getTotalDiscardedRaw
public long getTotalDiscardedRaw() -
getTotalSwarmsPeerRate
public long getTotalSwarmsPeerRate(boolean downloading, boolean seeding) - Specified by:
getTotalSwarmsPeerRatein interfaceGlobalManagerStats
-
getSmoothedSendRate
public long getSmoothedSendRate()Description copied from interface:GlobalManagerStatsSmoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs", see @linkGeneralUtilsfor defaults and limits- Specified by:
getSmoothedSendRatein interfaceGlobalManagerStats
-
getSmoothedReceiveRate
public long getSmoothedReceiveRate()Description copied from interface:GlobalManagerStatsSmoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" see @linkGeneralUtilsfor defaults and limits- Specified by:
getSmoothedReceiveRatein interfaceGlobalManagerStats
-
getCountryDetails
- Specified by:
getCountryDetailsin interfaceGlobalManagerStats
-
tick
public void tick(long mono_now, int tick_count) - Specified by:
tickin interfaceSimpleTimer.TimerTickReceiver
-
receiveRemoteStats
- Specified by:
receiveRemoteStatsin interfaceGlobalManagerStats
-
addRemoteStats
-
getAggregateRemoteStats
- Specified by:
getAggregateRemoteStatsin interfaceGlobalManagerStats
-
getAggregateLocalStats
- Specified by:
getAggregateLocalStatsin interfaceGlobalManagerStats
-
getAggregateLocalStats
- Specified by:
getAggregateLocalStatsin interfaceGlobalManagerStats
-