mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 21:34:10 -05:00
removed a few debug output and timer measurement
This commit is contained in:
parent
6d2bfcf04e
commit
4bdd464861
@ -603,8 +603,6 @@ int pqistreamer::handleoutgoing_locked()
|
|||||||
|
|
||||||
if (mPkt_wpending)
|
if (mPkt_wpending)
|
||||||
{
|
{
|
||||||
RsScopeTimer tmer("pqistreamer:"+PeerId().toStdString()) ;
|
|
||||||
|
|
||||||
// write packet.
|
// write packet.
|
||||||
#ifdef DEBUG_PQISTREAMER
|
#ifdef DEBUG_PQISTREAMER
|
||||||
std::cout << "Sending Out Pkt of size " << mPkt_wpending_size << " !" << std::endl;
|
std::cout << "Sending Out Pkt of size " << mPkt_wpending_size << " !" << std::endl;
|
||||||
|
@ -39,8 +39,6 @@
|
|||||||
/****
|
/****
|
||||||
* #define DEBUG_RTT 1
|
* #define DEBUG_RTT 1
|
||||||
****/
|
****/
|
||||||
#define DEBUG_RTT 1
|
|
||||||
|
|
||||||
|
|
||||||
/* DEFINE INTERFACE POINTER! */
|
/* DEFINE INTERFACE POINTER! */
|
||||||
RsRtt *rsRtt = NULL;
|
RsRtt *rsRtt = NULL;
|
||||||
@ -264,7 +262,9 @@ int p3rtt::handlePing(RsItem *item)
|
|||||||
pong->mPongTS = convertTsTo64bits(ts);
|
pong->mPongTS = convertTsTo64bits(ts);
|
||||||
|
|
||||||
static double mLastResponseToPong = 0.0 ;// bad stuff
|
static double mLastResponseToPong = 0.0 ;// bad stuff
|
||||||
|
#ifdef DEBUG_RTT
|
||||||
std::cerr << "Delay since last response to PONG: " << ts - mLastResponseToPong << std::endl;
|
std::cerr << "Delay since last response to PONG: " << ts - mLastResponseToPong << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
mLastResponseToPong = ts ;
|
mLastResponseToPong = ts ;
|
||||||
sendItem(pong);
|
sendItem(pong);
|
||||||
@ -309,7 +309,9 @@ int p3rtt::storePingAttempt(const RsPeerId& id, double ts, uint32_t seqno)
|
|||||||
/* find corresponding local data */
|
/* find corresponding local data */
|
||||||
RttPeerInfo *peerInfo = locked_GetPeerInfo(id);
|
RttPeerInfo *peerInfo = locked_GetPeerInfo(id);
|
||||||
|
|
||||||
|
#ifdef DEBUG_RTT
|
||||||
std::cerr << "Delay since previous ping attempt: " << ts - peerInfo->mCurrentPingTS << std::endl;
|
std::cerr << "Delay since previous ping attempt: " << ts - peerInfo->mCurrentPingTS << std::endl;
|
||||||
|
#endif
|
||||||
peerInfo->mCurrentPingTS = ts;
|
peerInfo->mCurrentPingTS = ts;
|
||||||
peerInfo->mCurrentPingCounter = seqno;
|
peerInfo->mCurrentPingCounter = seqno;
|
||||||
|
|
||||||
@ -343,8 +345,10 @@ int p3rtt::storePongResult(const RsPeerId& id, uint32_t counter, double recv_ts,
|
|||||||
{
|
{
|
||||||
peerInfo->mCurrentPongRecvd = true;
|
peerInfo->mCurrentPongRecvd = true;
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_RTT
|
||||||
if(!peerInfo->mPongResults.empty())
|
if(!peerInfo->mPongResults.empty())
|
||||||
std::cerr << "Delay since last pong: " << recv_ts - peerInfo->mPongResults.back().mTS << std::endl;
|
std::cerr << "Delay since last pong: " << recv_ts - peerInfo->mPongResults.back().mTS << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
peerInfo->mPongResults.push_back(RsRttPongResult(recv_ts, rtt, offset));
|
peerInfo->mPongResults.push_back(RsRttPongResult(recv_ts, rtt, offset));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user