Package com.biglybt.core.global.impl
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 class
private static class
private class
private static class
private static class
private static class
Nested classes/interfaces inherited from interface com.biglybt.core.global.GlobalManagerStats
GlobalManagerStats.AggregateStats, GlobalManagerStats.CountryDetails, GlobalManagerStats.RemoteCountryStats, GlobalManagerStats.RemoteStats
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String,
GlobalManagerStats.CountryDetails> private AtomicInteger
private String
private int
private int
private final Average
private final Average
private final Average
private int
private final Average
private DHT
private static final Object
private final GlobalManagerImpl
private static final long
private static final Object
private static final Object
private static final Object
private final Average
private final Average
private final Average
private final Average
private Map<DownloadManager,
List<PEPeer>> private int
private long
private long
private GeneralUtils.SmoothAverage
private GeneralUtils.SmoothAverage
private AsyncDispatcher
private Set<InetAddress>
private static final long
private static final long
private long
private long
private long
private long
private long
private long
private long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
GlobalManagerStatsImpl
(GlobalManagerImpl _manager) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
dataBytesReceived
(int length, boolean LAN) void
dataBytesSent
(int length, boolean LAN) void
discarded
(int length) int
int
int
Data Receive Rate over the last 10sint
int
getDataReceiveRateNoLAN
(int average_period) int
Data Send Rate over the last 10sint
int
int
getDataSendRateNoLAN
(int average_period) int
int
int
getProtocolReceiveRateNoLAN
(int average_period) int
int
int
getProtocolSendRateNoLAN
(int average_period) long
Smoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" see @linkGeneralUtils
for defaults and limitslong
Smoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs", see @linkGeneralUtils
for defaults and limitslong
long
long
long
long
long
getTotalSwarmsPeerRate
(boolean downloading, boolean seeding) protected void
load()
void
protocolBytesReceived
(int length, boolean LAN) void
protocolBytesSent
(int length, boolean LAN) void
protected void
save()
void
tick
(long mono_now, int tick_count) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.core.global.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 int 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 int getDataSendRateAtClose()- Specified by:
getDataSendRateAtClose
in interfaceGlobalManagerStats
-
discarded
public void discarded(int length) - Specified by:
discarded
in interfaceGlobalManagerStats
-
dataBytesReceived
public void dataBytesReceived(int length, boolean LAN) - Specified by:
dataBytesReceived
in interfaceGlobalManagerStats
-
protocolBytesReceived
public void protocolBytesReceived(int length, boolean LAN) - Specified by:
protocolBytesReceived
in interfaceGlobalManagerStats
-
dataBytesSent
public void dataBytesSent(int length, boolean LAN) - Specified by:
dataBytesSent
in interfaceGlobalManagerStats
-
protocolBytesSent
public void protocolBytesSent(int length, boolean LAN) - Specified by:
protocolBytesSent
in interfaceGlobalManagerStats
-
getDataReceiveRate
public int getDataReceiveRate()Description copied from interface:GlobalManagerStats
Data Receive Rate over the last 10s- Specified by:
getDataReceiveRate
in interfaceGlobalManagerStats
-
getDataReceiveRateNoLAN
public int getDataReceiveRateNoLAN()- Specified by:
getDataReceiveRateNoLAN
in interfaceGlobalManagerStats
-
getDataReceiveRateNoLAN
public int getDataReceiveRateNoLAN(int average_period) - Specified by:
getDataReceiveRateNoLAN
in interfaceGlobalManagerStats
-
getProtocolReceiveRate
public int getProtocolReceiveRate()- Specified by:
getProtocolReceiveRate
in interfaceGlobalManagerStats
-
getProtocolReceiveRateNoLAN
public int getProtocolReceiveRateNoLAN()- Specified by:
getProtocolReceiveRateNoLAN
in interfaceGlobalManagerStats
-
getProtocolReceiveRateNoLAN
public int getProtocolReceiveRateNoLAN(int average_period) - Specified by:
getProtocolReceiveRateNoLAN
in interfaceGlobalManagerStats
-
getDataAndProtocolReceiveRate
public int getDataAndProtocolReceiveRate()- Specified by:
getDataAndProtocolReceiveRate
in interfaceGlobalManagerStats
-
getDataSendRate
public int getDataSendRate()Description copied from interface:GlobalManagerStats
Data Send Rate over the last 10s- Specified by:
getDataSendRate
in interfaceGlobalManagerStats
-
getDataSendRateNoLAN
public int getDataSendRateNoLAN()- Specified by:
getDataSendRateNoLAN
in interfaceGlobalManagerStats
-
getDataSendRateNoLAN
public int getDataSendRateNoLAN(int average_period) - Specified by:
getDataSendRateNoLAN
in interfaceGlobalManagerStats
-
getProtocolSendRate
public int getProtocolSendRate()- Specified by:
getProtocolSendRate
in interfaceGlobalManagerStats
-
getProtocolSendRateNoLAN
public int getProtocolSendRateNoLAN()- Specified by:
getProtocolSendRateNoLAN
in interfaceGlobalManagerStats
-
getProtocolSendRateNoLAN
public int getProtocolSendRateNoLAN(int average_period) - Specified by:
getProtocolSendRateNoLAN
in interfaceGlobalManagerStats
-
getDataAndProtocolSendRate
public int getDataAndProtocolSendRate()- Specified by:
getDataAndProtocolSendRate
in interfaceGlobalManagerStats
-
getTotalDataBytesSent
public long getTotalDataBytesSent()- Specified by:
getTotalDataBytesSent
in interfaceGlobalManagerStats
-
getTotalProtocolBytesSent
public long getTotalProtocolBytesSent()- Specified by:
getTotalProtocolBytesSent
in interfaceGlobalManagerStats
-
getTotalDataBytesReceived
public long getTotalDataBytesReceived()- Specified by:
getTotalDataBytesReceived
in interfaceGlobalManagerStats
-
getTotalProtocolBytesReceived
public long getTotalProtocolBytesReceived()- Specified by:
getTotalProtocolBytesReceived
in interfaceGlobalManagerStats
-
getTotalDiscardedRaw
public long getTotalDiscardedRaw() -
getTotalSwarmsPeerRate
public long getTotalSwarmsPeerRate(boolean downloading, boolean seeding) - Specified by:
getTotalSwarmsPeerRate
in interfaceGlobalManagerStats
-
getSmoothedSendRate
public long getSmoothedSendRate()Description copied from interface:GlobalManagerStats
Smoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs", see @linkGeneralUtils
for defaults and limits- Specified by:
getSmoothedSendRate
in interfaceGlobalManagerStats
-
getSmoothedReceiveRate
public long getSmoothedReceiveRate()Description copied from interface:GlobalManagerStats
Smoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" see @linkGeneralUtils
for defaults and limits- Specified by:
getSmoothedReceiveRate
in interfaceGlobalManagerStats
-
getCountryDetails
- Specified by:
getCountryDetails
in interfaceGlobalManagerStats
-
tick
public void tick(long mono_now, int tick_count) - Specified by:
tick
in interfaceSimpleTimer.TimerTickReceiver
-
receiveRemoteStats
- Specified by:
receiveRemoteStats
in interfaceGlobalManagerStats
-
addRemoteStats
-
getAggregateRemoteStats
- Specified by:
getAggregateRemoteStats
in interfaceGlobalManagerStats
-
getAggregateLocalStats
- Specified by:
getAggregateLocalStats
in interfaceGlobalManagerStats
-
getAggregateLocalStats
- Specified by:
getAggregateLocalStats
in interfaceGlobalManagerStats
-