debugging

This commit is contained in:
Dhanya Maliakal 2016-11-09 09:19:11 +01:00
parent b8ffe24c5f
commit 6a2adb48aa

View File

@ -2748,16 +2748,29 @@ void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer){
//Print packet loss //Print packet loss
if(totalWritingPacketCountFromLastCheck[ithread]){ if(totalWritingPacketCountFromLastCheck[ithread]){
thread/****/ if(numberofWriterThreads>1){
printf("\nPackets Lost:%d" printf("\nThread:%d"
"\tPacketsFromLastCheck:%lld" "\tPackets Lost:%d"
"\tCurrentFrameNumber:%lld" "\tPacketsFromLastCheck:%lld"
"\tPreviousFrameNumber:%lld\n", "\tCurrentFrameNumber:%lld"
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]), "\tPreviousFrameNumber:%lld\n",
totalWritingPacketCountFromLastCheck[ithread], ithread,
currentFrameNumber[ithread], ( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]),
frameNumberInPreviousCheck[ithread] totalWritingPacketCountFromLastCheck[ithread],
); currentFrameNumber[ithread],
frameNumberInPreviousCheck[ithread]
);
}else{
printf("\nPackets Lost:%d"
"\tPacketsFromLastCheck:%lld"
"\tCurrentFrameNumber:%lld"
"\tPreviousFrameNumber:%lld\n",
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]),
totalWritingPacketCountFromLastCheck[ithread],
currentFrameNumber[ithread],
frameNumberInPreviousCheck[ithread]
);
}
} }
closeFile(ithread); closeFile(ithread);
@ -2916,12 +2929,10 @@ void UDPStandardImplementation::handleWithoutMissingPackets(int ithread, char* w
//Print packet loss and filenames //Print packet loss and filenames
if(tempframenumber && (tempframenumber%(maxFramesPerFile/10)) == 0){ if(tempframenumber && (tempframenumber%(maxFramesPerFile/10)) == 0){
cprintf(BLUE,"\nThread:%d" cprintf(BLUE,"\nPackets Lost:%d"
"\t\tPackets Lost:%d"
"\tPacketsFromLastCheck:%lld" "\tPacketsFromLastCheck:%lld"
"\tCurrentFrameNumber:%lld" "\tCurrentFrameNumber:%lld"
"\tPreviousFrameNumber:%lld\n", "\tPreviousFrameNumber:%lld\n",
ithread,
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]), ( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]),
totalWritingPacketCountFromLastCheck[ithread], totalWritingPacketCountFromLastCheck[ithread],
currentFrameNumber[ithread], currentFrameNumber[ithread],