From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llmessage/llcircuit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llmessage/llcircuit.h') diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 430d6358f7..11d4e1b11c 100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -34,7 +34,6 @@ #include "llerror.h" #include "lltimer.h" -#include "timing.h" #include "net.h" #include "llhost.h" #include "llpacketack.h" @@ -51,6 +50,8 @@ const F32 LL_AVERAGED_PING_MIN = 100; // msec // IW: increased to avoid ret const U32 INITIAL_PING_VALUE_MSEC = 1000; // initial value for the ping delay, or for ping delay for an unknown circuit const TPACKETID LL_MAX_OUT_PACKET_ID = 0x01000000; +const int LL_ERR_CIRCUIT_GONE = -23017; +const int LL_ERR_TCP_TIMEOUT = -23016; // 0 - flags // [1,4] - packetid -- cgit v1.2.3 From 25937040de9a787c221aae7f178f43827c799028 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Aug 2013 12:38:12 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms converted many values over to units system in effort to track down source of 0 ping --- indra/llmessage/llcircuit.h | 74 ++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'indra/llmessage/llcircuit.h') diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 11d4e1b11c..bc29805859 100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -44,10 +44,10 @@ // Constants // const F32 LL_AVERAGED_PING_ALPHA = 0.2f; // relaxation constant on ping running average -const F32 LL_AVERAGED_PING_MAX = 2000; // msec -const F32 LL_AVERAGED_PING_MIN = 100; // msec // IW: increased to avoid retransmits when a process is slow +const F32Milliseconds LL_AVERAGED_PING_MAX(2000); +const F32Milliseconds LL_AVERAGED_PING_MIN(100); // increased to avoid retransmits when a process is slow -const U32 INITIAL_PING_VALUE_MSEC = 1000; // initial value for the ping delay, or for ping delay for an unknown circuit +const U32Milliseconds INITIAL_PING_VALUE_MSEC(1000); // initial value for the ping delay, or for ping delay for an unknown circuit const TPACKETID LL_MAX_OUT_PACKET_ID = 0x01000000; const int LL_ERR_CIRCUIT_GONE = -23017; @@ -77,10 +77,10 @@ class LLCircuitData { public: LLCircuitData(const LLHost &host, TPACKETID in_id, - const F32 circuit_heartbeat_interval, const F32 circuit_timeout); + const F32Seconds circuit_heartbeat_interval, const F32Seconds circuit_timeout); ~LLCircuitData(); - S32 resendUnackedPackets(const F64 now); + S32 resendUnackedPackets(const F64Seconds now); void clearDuplicateList(TPACKETID oldest_id); @@ -106,18 +106,18 @@ public: // mLocalEndPointID should only ever be setup in the LLCircuitData constructor const LLUUID& getLocalEndPointID() const { return mLocalEndPointID; } - U32 getPingDelay() const; + U32Milliseconds getPingDelay() const; S32 getPingsInTransit() const { return mPingsInTransit; } // ACCESSORS BOOL isAlive() const; BOOL isBlocked() const; BOOL getAllowTimeout() const; - F32 getPingDelayAveraged(); - F32 getPingInTransitTime(); + F32Milliseconds getPingDelayAveraged(); + F32Milliseconds getPingInTransitTime(); U32 getPacketsIn() const; - S32 getBytesIn() const; - S32 getBytesOut() const; + S32Bytes getBytesIn() const; + S32Bytes getBytesOut() const; U32 getPacketsOut() const; U32 getPacketsLost() const; TPACKETID getPacketOutID() const; @@ -125,10 +125,10 @@ public: F32 getAgeInSeconds() const; S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } - F64 getNextPingSendTime() const { return mNextPingSendTime; } + F64Seconds getNextPingSendTime() const { return mNextPingSendTime; } U32 getLastPacketGap() const { return mLastPacketGap; } LLHost getHost() const { return mHost; } - F64 getLastPacketInTime() const { return mLastPacketInTime; } + F64Seconds getLastPacketInTime() const { return mLastPacketInTime; } LLThrottleGroup &getThrottleGroup() { return mThrottles; } @@ -164,7 +164,7 @@ protected: TPACKETID nextPacketOutID(); void setPacketInID(TPACKETID id); void checkPacketInID(TPACKETID id, BOOL receive_resent); - void setPingDelay(U32 ping); + void setPingDelay(U32Milliseconds ping); BOOL checkCircuitTimeout(); // Return FALSE if the circuit is dead and should be cleaned up void addBytesIn(S32 bytes); @@ -219,20 +219,20 @@ protected: BOOL mBlocked; // Blocked is true if the circuit is hosed, i.e. far behind on pings // Not sure what the difference between this and mLastPingSendTime is - F64 mPingTime; // Time at which a ping was sent. + F64Seconds mPingTime; // Time at which a ping was sent. - F64 mLastPingSendTime; // Time we last sent a ping - F64 mLastPingReceivedTime; // Time we last received a ping - F64 mNextPingSendTime; // Time to try and send the next ping - S32 mPingsInTransit; // Number of pings in transit - U8 mLastPingID; // ID of the last ping that we sent out + F64Seconds mLastPingSendTime; // Time we last sent a ping + F64Seconds mLastPingReceivedTime; // Time we last received a ping + F64Seconds mNextPingSendTime; // Time to try and send the next ping + S32 mPingsInTransit; // Number of pings in transit + U8 mLastPingID; // ID of the last ping that we sent out // Used for determining the resend time for reliable resends. - U32 mPingDelay; // raw ping delay - F32 mPingDelayAveraged; // averaged ping delay (fast attack/slow decay) + U32Milliseconds mPingDelay; // raw ping delay + F32Milliseconds mPingDelayAveraged; // averaged ping delay (fast attack/slow decay) - typedef std::map packet_time_map; + typedef std::map packet_time_map; packet_time_map mPotentialLostPackets; packet_time_map mRecentlyReceivedReliablePackets; @@ -247,7 +247,7 @@ protected: S32 mUnackedPacketCount; S32 mUnackedPacketBytes; - F64 mLastPacketInTime; // Time of last packet arrival + F64Seconds mLastPacketInTime; // Time of last packet arrival LLUUID mLocalEndPointID; @@ -259,24 +259,24 @@ protected: U32 mPacketsOut; U32 mPacketsIn; S32 mPacketsLost; - S32 mBytesIn; - S32 mBytesOut; - - F32 mLastPeriodLength; // seconds - S32 mBytesInLastPeriod; - S32 mBytesOutLastPeriod; - S32 mBytesInThisPeriod; - S32 mBytesOutThisPeriod; + S32Bytes mBytesIn, + mBytesOut; + + F32Seconds mLastPeriodLength; + S32Bytes mBytesInLastPeriod; + S32Bytes mBytesOutLastPeriod; + S32Bytes mBytesInThisPeriod; + S32Bytes mBytesOutThisPeriod; F32 mPeakBPSIn; // bits per second, max of all period bps F32 mPeakBPSOut; // bits per second, max of all period bps - F64 mPeriodTime; + F64Seconds mPeriodTime; LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers S32 mCurrentResendCount; // Number of resent packets since last spam U32 mLastPacketGap; // Gap in sequence number of last packet. - const F32 mHeartbeatInterval; - const F32 mHeartbeatTimeout; + const F32Seconds mHeartbeatInterval; + const F32Seconds mHeartbeatTimeout; }; @@ -286,7 +286,7 @@ class LLCircuit { public: // CREATORS - LLCircuit(const F32 circuit_heartbeat_interval, const F32 circuit_timeout); + LLCircuit(const F32Seconds circuit_heartbeat_interval, const F32Seconds circuit_timeout); ~LLCircuit(); // ACCESSORS @@ -341,7 +341,7 @@ protected: mutable LLCircuitData* mLastCircuit; private: - const F32 mHeartbeatInterval; - const F32 mHeartbeatTimeout; + const F32Seconds mHeartbeatInterval; + const F32Seconds mHeartbeatTimeout; }; #endif -- cgit v1.2.3 From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits --- indra/llmessage/llcircuit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llcircuit.h') diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index bc29805859..5b109fc218 100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -167,8 +167,8 @@ protected: void setPingDelay(U32Milliseconds ping); BOOL checkCircuitTimeout(); // Return FALSE if the circuit is dead and should be cleaned up - void addBytesIn(S32 bytes); - void addBytesOut(S32 bytes); + void addBytesIn(S32Bytes bytes); + void addBytesOut(S32Bytes bytes); U8 nextPingID() { mLastPingID++; return mLastPingID; } -- cgit v1.2.3