more stats

This commit is contained in:
ZappoMan 2013-07-18 15:14:11 -07:00
parent 4d1ae43085
commit 11eabf3c51
2 changed files with 64 additions and 0 deletions

View file

@ -67,6 +67,18 @@ void VoxelSceneStats::reset() {
_internalDidntFit = 0;
_leavesDidntFit = 0;
_colorBitsWritten = 0;
_internalColorBitsWritten = 0;
_leavesColorBitsWritten = 0;
_existsBitsWritten = 0;
_internalExistsBitsWritten = 0;
_leavesExistsBitsWritten = 0;
_existsInPacketBitsWritten = 0;
_internalExistsInPacketBitsWritten = 0;
_leavesExistsInPacketBitsWritten = 0;
}
void VoxelSceneStats::packetSent(int bytes) {
@ -146,6 +158,35 @@ void VoxelSceneStats::didntFit(const VoxelNode* node) {
}
}
void VoxelSceneStats::colorBitsWritten(const VoxelNode* node) {
_colorBitsWritten++;
if (node->isLeaf()) {
_leavesColorBitsWritten++;
} else {
_internalColorBitsWritten++;
}
}
void VoxelSceneStats::existsBitsWritten(const VoxelNode* node) {
_existsBitsWritten++;
if (node->isLeaf()) {
_leavesExistsBitsWritten++;
} else {
_internalExistsBitsWritten++;
}
}
void VoxelSceneStats::existsInPacketBitsWritten(const VoxelNode* node) {
_existsInPacketBitsWritten++;
if (node->isLeaf()) {
_leavesExistsInPacketBitsWritten++;
} else {
_internalExistsInPacketBitsWritten++;
}
}
void VoxelSceneStats::printDebugDetails() {
qDebug("\n------------------------------\n");
qDebug("VoxelSceneStats:\n");
@ -177,10 +218,21 @@ void VoxelSceneStats::printDebugDetails() {
qDebug(" skipped occluded : %lu\n", _skippedOccluded );
qDebug(" internal : %lu\n", _internalSkippedOccluded );
qDebug(" leaves : %lu\n", _leavesSkippedOccluded );
qDebug("\n");
qDebug(" color sent : %lu\n", _colorSent );
qDebug(" internal : %lu\n", _internalColorSent );
qDebug(" leaves : %lu\n", _leavesColorSent );
qDebug(" Didn't Fit : %lu\n", _didntFit );
qDebug(" internal : %lu\n", _internalDidntFit );
qDebug(" leaves : %lu\n", _leavesDidntFit );
qDebug(" color bits : %lu\n", _colorBitsWritten );
qDebug(" internal : %lu\n", _internalColorBitsWritten );
qDebug(" leaves : %lu\n", _leavesColorBitsWritten );
qDebug(" exists bits : %lu\n", _existsBitsWritten );
qDebug(" internal : %lu\n", _internalExistsBitsWritten);
qDebug(" leaves : %lu\n", _leavesExistsBitsWritten );
qDebug(" in packet bit : %lu\n", _existsInPacketBitsWritten );
qDebug(" internal : %lu\n", _internalExistsInPacketBitsWritten);
qDebug(" leaves : %lu\n", _leavesExistsInPacketBitsWritten );
}

View file

@ -74,6 +74,18 @@ private:
unsigned long _internalDidntFit;
unsigned long _leavesDidntFit;
unsigned long _colorBitsWritten;
unsigned long _internalColorBitsWritten;
unsigned long _leavesColorBitsWritten;
unsigned long _existsBitsWritten;
unsigned long _internalExistsBitsWritten;
unsigned long _leavesExistsBitsWritten;
unsigned long _existsInPacketBitsWritten;
unsigned long _internalExistsInPacketBitsWritten;
unsigned long _leavesExistsInPacketBitsWritten;
unsigned long total;
unsigned long internalOutOfView;
unsigned long internalOccluded;