From 060c391d4707de1d5cb5b2ddbf33af6d5ff0d77d Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 12 Apr 2018 13:51:15 -0700 Subject: [PATCH 1/3] more correct stat names --- interface/src/Application.cpp | 16 ++++++++-------- interface/src/ui/Stats.cpp | 6 +++--- libraries/physics/src/EntityMotionState.h | 2 +- libraries/physics/src/PhysicsEngine.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 0445a0dbea..dde66c508b 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5272,12 +5272,12 @@ void Application::update(float deltaTime) { QSharedPointer avatarManager = DependencyManager::get(); { - PROFILE_RANGE(simulation_physics, "Physics"); - PerformanceTimer perfTimer("physics"); + PROFILE_RANGE(simulation_physics, "Simulation"); + PerformanceTimer perfTimer("simulation"); if (_physicsEnabled) { { - PROFILE_RANGE(simulation_physics, "PreStep"); - PerformanceTimer perfTimer("preStep)"); + PROFILE_RANGE(simulation_physics, "PrePhysics"); + PerformanceTimer perfTimer("prePhys)"); { const VectorOfMotionStates& motionStates = _entitySimulation->getObjectsToRemoveFromPhysics(); _physicsEngine->removeObjects(motionStates); @@ -5311,15 +5311,15 @@ void Application::update(float deltaTime) { }); } { - PROFILE_RANGE(simulation_physics, "Step"); - PerformanceTimer perfTimer("step"); + PROFILE_RANGE(simulation_physics, "StepPhysics"); + PerformanceTimer perfTimer("stepPhysics"); getEntities()->getTree()->withWriteLock([&] { _physicsEngine->stepSimulation(); }); } { - PROFILE_RANGE(simulation_physics, "PostStep"); - PerformanceTimer perfTimer("postStep"); + PROFILE_RANGE(simulation_physics, "PostPhysics"); + PerformanceTimer perfTimer("postPhysics"); if (_physicsEngine->hasOutgoingChanges()) { // grab the collision events BEFORE handleOutgoingChanges() because at this point // we have a better idea of which objects we own or should own. diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index 64ee492716..61de6977bd 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -60,7 +60,7 @@ Stats::Stats(QQuickItem* parent) : QQuickItem(parent) { bool Stats::includeTimingRecord(const QString& name) { if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayDebugTimingDetails)) { if (name.startsWith("/idle/update/")) { - if (name.startsWith("/idle/update/physics/")) { + if (name.startsWith("/idle/update/simulation/")) { return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming); } else if (name.startsWith("/idle/update/myAvatar/")) { if (name.startsWith("/idle/update/myAvatar/simulate/")) { @@ -75,7 +75,7 @@ bool Stats::includeTimingRecord(const QString& name) { return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming); } else if (name.startsWith("/paintGL/")) { return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming); - } else if (name.startsWith("step/")) { + } else if (name.startsWith("physics/")) { return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming); } return true; @@ -479,7 +479,7 @@ void Stats::updateStats(bool force) { float dt = (float)itr.value().getMovingAverage() / (float)USECS_PER_MSEC; _gameUpdateStats = QString("/idle/update = %1 ms").arg(dt); - QVector categories = { "devices", "physics", "otherAvatars", "MyAvatar", "misc" }; + QVector categories = { "devices", "simulation", "otherAvatars", "MyAvatar", "misc" }; for (int32_t j = 0; j < categories.size(); ++j) { QString recordKey = "/idle/update/" + categories[j]; itr = allRecords.find(recordKey); diff --git a/libraries/physics/src/EntityMotionState.h b/libraries/physics/src/EntityMotionState.h index 807acbfe80..a542c61d43 100644 --- a/libraries/physics/src/EntityMotionState.h +++ b/libraries/physics/src/EntityMotionState.h @@ -132,7 +132,7 @@ protected: // // (2) For locally owned simulation: we store the last values sent to the server, integrated forward over time // according to how we think the server doing it. We calculate the error between the true local transform - // and the remote to decide when to send another update. + // and the remote to decide whether to send another update or not. // glm::vec3 _serverPosition; // in simulation-frame (not world-frame) glm::quat _serverRotation; diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index abf7f95299..3be69bba00 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -415,7 +415,7 @@ void PhysicsEngine::harvestPerformanceStats() { if (QString(itr->Get_Current_Name()) == "stepSimulation") { itr->Enter_Child(childIndex); StatsHarvester harvester; - harvester.recurse(itr, "step/"); + harvester.recurse(itr, "physics/"); break; } itr->Next(); From d553f85e83928cd5b743e1a619dec529b3cb4076 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 12 Apr 2018 14:23:06 -0700 Subject: [PATCH 2/3] adding pickManager and pointerManager to stat summary --- interface/src/ui/Stats.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index 61de6977bd..ad7585597b 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -479,7 +479,14 @@ void Stats::updateStats(bool force) { float dt = (float)itr.value().getMovingAverage() / (float)USECS_PER_MSEC; _gameUpdateStats = QString("/idle/update = %1 ms").arg(dt); - QVector categories = { "devices", "simulation", "otherAvatars", "MyAvatar", "misc" }; + QVector categories = { + "devices", + "MyAvatar", + "otherAvatars", + "pickManager", + "pointerManager", + "simulation" + }; for (int32_t j = 0; j < categories.size(); ++j) { QString recordKey = "/idle/update/" + categories[j]; itr = allRecords.find(recordKey); From 6633304773049d84dea6826a4d76a9939c94e898 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 12 Apr 2018 15:02:24 -0700 Subject: [PATCH 3/3] fix typo --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index dde66c508b..e4227fca13 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5277,7 +5277,7 @@ void Application::update(float deltaTime) { if (_physicsEnabled) { { PROFILE_RANGE(simulation_physics, "PrePhysics"); - PerformanceTimer perfTimer("prePhys)"); + PerformanceTimer perfTimer("prePhysics)"); { const VectorOfMotionStates& motionStates = _entitySimulation->getObjectsToRemoveFromPhysics(); _physicsEngine->removeObjects(motionStates);