Added notion of Flows

This commit is contained in:
Joseph Henry 2019-08-19 21:52:33 -07:00
parent 15e44f0ddd
commit 0634214f2c
8 changed files with 449 additions and 123 deletions

View file

@ -308,7 +308,6 @@ public:
*/
inline void recordOutgoingPacket(int64_t now, int64_t packetId, uint16_t payloadLength, Packet::Verb verb)
{
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
if (verb != Packet::VERB_ACK && verb != Packet::VERB_QOS_MEASUREMENT) {
if ((packetId & (ZT_PATH_QOS_ACK_PROTOCOL_DIVISOR - 1)) == 0) {
@ -332,7 +331,6 @@ public:
*/
inline void recordIncomingPacket(int64_t now, int64_t packetId, uint16_t payloadLength, Packet::Verb verb)
{
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
if (verb != Packet::VERB_ACK && verb != Packet::VERB_QOS_MEASUREMENT) {
if ((packetId & (ZT_PATH_QOS_ACK_PROTOCOL_DIVISOR - 1)) == 0) {
@ -353,7 +351,6 @@ public:
*/
inline void receivedAck(int64_t now, int32_t ackedBytes)
{
DEBUG_INFO("");
_expectingAckAsOf = 0;
_unackedBytes = (ackedBytes > _unackedBytes) ? 0 : _unackedBytes - ackedBytes;
int64_t timeSinceThroughputEstimate = (now - _lastThroughputEstimation);
@ -398,7 +395,6 @@ public:
*/
inline void sentAck(int64_t now)
{
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
_inACKRecords.clear();
_packetsReceivedSinceLastAck = 0;
@ -416,7 +412,6 @@ public:
*/
inline void receivedQoS(int64_t now, int count, uint64_t *rx_id, uint16_t *rx_ts)
{
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
// Look up egress times and compute latency values for each record
std::map<uint64_t,uint64_t>::iterator it;
@ -441,7 +436,6 @@ public:
*/
inline int32_t generateQoSPacket(int64_t now, char *qosBuffer)
{
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
int32_t len = 0;
std::map<uint64_t,uint64_t>::iterator it = _inQoSRecords.begin();
@ -466,7 +460,6 @@ public:
* @param Current time
*/
inline void sentQoS(int64_t now) {
DEBUG_INFO("");
_packetsReceivedSinceLastQoS = 0;
_lastQoSMeasurement = now;
}
@ -586,7 +579,6 @@ public:
inline void processBackgroundPathMeasurements(const int64_t now)
{
if (now - _lastPathQualityComputeTime > ZT_PATH_QUALITY_COMPUTE_INTERVAL) {
DEBUG_INFO("");
Mutex::Lock _l(_statistics_m);
_lastPathQualityComputeTime = now;
address().toString(_addrString);