mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 11:52:04 +02:00
update Stats to new tbb node iteration
This commit is contained in:
parent
ce02d79d41
commit
2f66e56e46
1 changed files with 2 additions and 5 deletions
|
@ -329,10 +329,7 @@ void Stats::display(
|
|||
unsigned long totalPingVoxel = 0;
|
||||
int voxelServerCount = 0;
|
||||
|
||||
NodeHashSnapshot snapshotHash = nodeList->getNodeHash().snapshot_table();
|
||||
|
||||
for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
|
||||
SharedNodePointer node = it->second;
|
||||
nodeList->eachNode([&totalPingVoxel, &pingVoxelMax, &voxelServerCount](const SharedNodePointer& node){
|
||||
// TODO: this should also support entities
|
||||
if (node->getType() == NodeType::VoxelServer) {
|
||||
totalPingVoxel += node->getPingMs();
|
||||
|
@ -341,7 +338,7 @@ void Stats::display(
|
|||
pingVoxelMax = node->getPingMs();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (voxelServerCount) {
|
||||
pingVoxel = totalPingVoxel/voxelServerCount;
|
||||
|
|
Loading…
Reference in a new issue