mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
Merge pull request #12880 from AndrewMeadows/more-correct-stats
workload: more correct stats names
This commit is contained in:
commit
3f45f091fc
4 changed files with 20 additions and 13 deletions
|
@ -5272,12 +5272,12 @@ void Application::update(float deltaTime) {
|
||||||
QSharedPointer<AvatarManager> avatarManager = DependencyManager::get<AvatarManager>();
|
QSharedPointer<AvatarManager> avatarManager = DependencyManager::get<AvatarManager>();
|
||||||
|
|
||||||
{
|
{
|
||||||
PROFILE_RANGE(simulation_physics, "Physics");
|
PROFILE_RANGE(simulation_physics, "Simulation");
|
||||||
PerformanceTimer perfTimer("physics");
|
PerformanceTimer perfTimer("simulation");
|
||||||
if (_physicsEnabled) {
|
if (_physicsEnabled) {
|
||||||
{
|
{
|
||||||
PROFILE_RANGE(simulation_physics, "PreStep");
|
PROFILE_RANGE(simulation_physics, "PrePhysics");
|
||||||
PerformanceTimer perfTimer("preStep)");
|
PerformanceTimer perfTimer("prePhysics)");
|
||||||
{
|
{
|
||||||
const VectorOfMotionStates& motionStates = _entitySimulation->getObjectsToRemoveFromPhysics();
|
const VectorOfMotionStates& motionStates = _entitySimulation->getObjectsToRemoveFromPhysics();
|
||||||
_physicsEngine->removeObjects(motionStates);
|
_physicsEngine->removeObjects(motionStates);
|
||||||
|
@ -5311,15 +5311,15 @@ void Application::update(float deltaTime) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PROFILE_RANGE(simulation_physics, "Step");
|
PROFILE_RANGE(simulation_physics, "StepPhysics");
|
||||||
PerformanceTimer perfTimer("step");
|
PerformanceTimer perfTimer("stepPhysics");
|
||||||
getEntities()->getTree()->withWriteLock([&] {
|
getEntities()->getTree()->withWriteLock([&] {
|
||||||
_physicsEngine->stepSimulation();
|
_physicsEngine->stepSimulation();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PROFILE_RANGE(simulation_physics, "PostStep");
|
PROFILE_RANGE(simulation_physics, "PostPhysics");
|
||||||
PerformanceTimer perfTimer("postStep");
|
PerformanceTimer perfTimer("postPhysics");
|
||||||
if (_physicsEngine->hasOutgoingChanges()) {
|
if (_physicsEngine->hasOutgoingChanges()) {
|
||||||
// grab the collision events BEFORE handleOutgoingChanges() because at this point
|
// grab the collision events BEFORE handleOutgoingChanges() because at this point
|
||||||
// we have a better idea of which objects we own or should own.
|
// we have a better idea of which objects we own or should own.
|
||||||
|
|
|
@ -60,7 +60,7 @@ Stats::Stats(QQuickItem* parent) : QQuickItem(parent) {
|
||||||
bool Stats::includeTimingRecord(const QString& name) {
|
bool Stats::includeTimingRecord(const QString& name) {
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayDebugTimingDetails)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayDebugTimingDetails)) {
|
||||||
if (name.startsWith("/idle/update/")) {
|
if (name.startsWith("/idle/update/")) {
|
||||||
if (name.startsWith("/idle/update/physics/")) {
|
if (name.startsWith("/idle/update/simulation/")) {
|
||||||
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming);
|
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming);
|
||||||
} else if (name.startsWith("/idle/update/myAvatar/")) {
|
} else if (name.startsWith("/idle/update/myAvatar/")) {
|
||||||
if (name.startsWith("/idle/update/myAvatar/simulate/")) {
|
if (name.startsWith("/idle/update/myAvatar/simulate/")) {
|
||||||
|
@ -75,7 +75,7 @@ bool Stats::includeTimingRecord(const QString& name) {
|
||||||
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming);
|
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming);
|
||||||
} else if (name.startsWith("/paintGL/")) {
|
} else if (name.startsWith("/paintGL/")) {
|
||||||
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming);
|
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPaintGLTiming);
|
||||||
} else if (name.startsWith("step/")) {
|
} else if (name.startsWith("physics/")) {
|
||||||
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming);
|
return Menu::getInstance()->isOptionChecked(MenuOption::ExpandPhysicsSimulationTiming);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -479,7 +479,14 @@ void Stats::updateStats(bool force) {
|
||||||
float dt = (float)itr.value().getMovingAverage() / (float)USECS_PER_MSEC;
|
float dt = (float)itr.value().getMovingAverage() / (float)USECS_PER_MSEC;
|
||||||
_gameUpdateStats = QString("/idle/update = %1 ms").arg(dt);
|
_gameUpdateStats = QString("/idle/update = %1 ms").arg(dt);
|
||||||
|
|
||||||
QVector<QString> categories = { "devices", "physics", "otherAvatars", "MyAvatar", "misc" };
|
QVector<QString> categories = {
|
||||||
|
"devices",
|
||||||
|
"MyAvatar",
|
||||||
|
"otherAvatars",
|
||||||
|
"pickManager",
|
||||||
|
"pointerManager",
|
||||||
|
"simulation"
|
||||||
|
};
|
||||||
for (int32_t j = 0; j < categories.size(); ++j) {
|
for (int32_t j = 0; j < categories.size(); ++j) {
|
||||||
QString recordKey = "/idle/update/" + categories[j];
|
QString recordKey = "/idle/update/" + categories[j];
|
||||||
itr = allRecords.find(recordKey);
|
itr = allRecords.find(recordKey);
|
||||||
|
|
|
@ -132,7 +132,7 @@ protected:
|
||||||
//
|
//
|
||||||
// (2) For locally owned simulation: we store the last values sent to the server, integrated forward over time
|
// (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
|
// 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::vec3 _serverPosition; // in simulation-frame (not world-frame)
|
||||||
glm::quat _serverRotation;
|
glm::quat _serverRotation;
|
||||||
|
|
|
@ -415,7 +415,7 @@ void PhysicsEngine::harvestPerformanceStats() {
|
||||||
if (QString(itr->Get_Current_Name()) == "stepSimulation") {
|
if (QString(itr->Get_Current_Name()) == "stepSimulation") {
|
||||||
itr->Enter_Child(childIndex);
|
itr->Enter_Child(childIndex);
|
||||||
StatsHarvester harvester;
|
StatsHarvester harvester;
|
||||||
harvester.recurse(itr, "step/");
|
harvester.recurse(itr, "physics/");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
itr->Next();
|
itr->Next();
|
||||||
|
|
Loading…
Reference in a new issue