From b98c379182fcdac3d389a00ec7324e210d159239 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 5 Oct 2016 16:12:38 +0200 Subject: [PATCH] Added more stats to input buffering benchmarking code --- src/input/input.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/input/input.cpp b/src/input/input.cpp index 601e2a40..91df1c0c 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -473,16 +473,20 @@ namespace Mist { getNext(); } uint64_t lastBuffered = 0; + uint64_t packCounter = 0; + uint64_t byteCounter = 0; while (thisPacket && thisPacket.getTime() < stopTime) { if (thisPacket.getTime() >= lastBuffered){ bufferNext(thisPacket); + ++packCounter; + byteCounter += thisPacket.getDataLen(); lastBuffered = thisPacket.getTime(); } getNext(); } bufferFinalize(track); 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; return true; }