mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:53:03 +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>();
|
||||
|
||||
{
|
||||
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("prePhysics)");
|
||||
{
|
||||
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.
|
||||
|
|
|
@ -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,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<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) {
|
||||
QString recordKey = "/idle/update/" + categories[j];
|
||||
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
|
||||
// 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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue