Added more stats to input buffering benchmarking code
This commit is contained in:
		
							parent
							
								
									54d927c9df
								
							
						
					
					
						commit
						b98c379182
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -473,16 +473,20 @@ namespace Mist {
 | 
				
			||||||
      getNext();
 | 
					      getNext();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    uint64_t lastBuffered = 0;
 | 
					    uint64_t lastBuffered = 0;
 | 
				
			||||||
 | 
					    uint64_t packCounter = 0;
 | 
				
			||||||
 | 
					    uint64_t byteCounter = 0;
 | 
				
			||||||
    while (thisPacket && thisPacket.getTime() < stopTime) {
 | 
					    while (thisPacket && thisPacket.getTime() < stopTime) {
 | 
				
			||||||
      if (thisPacket.getTime() >= lastBuffered){
 | 
					      if (thisPacket.getTime() >= lastBuffered){
 | 
				
			||||||
        bufferNext(thisPacket);
 | 
					        bufferNext(thisPacket);
 | 
				
			||||||
 | 
					        ++packCounter;
 | 
				
			||||||
 | 
					        byteCounter += thisPacket.getDataLen();
 | 
				
			||||||
        lastBuffered = thisPacket.getTime();
 | 
					        lastBuffered = thisPacket.getTime();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      getNext();
 | 
					      getNext();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    bufferFinalize(track);
 | 
					    bufferFinalize(track);
 | 
				
			||||||
    bufferTimer = Util::getMS() - bufferTimer;
 | 
					    bufferTimer = Util::getMS() - bufferTimer;
 | 
				
			||||||
    DEBUG_MSG(DLVL_DEVEL, "Done buffering page %d for track %d in %llums", keyNum, track, bufferTimer);
 | 
					    DEBUG_MSG(DLVL_DEVEL, "Done buffering page %d (%llu packets, %llu bytes) for track %d in %llums", keyNum, packCounter, byteCounter, track, bufferTimer);
 | 
				
			||||||
    pageCounter[track][keyNum] = 15;
 | 
					    pageCounter[track][keyNum] = 15;
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue