mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:29:54 +02:00
Merge pull request #8906 from ZappoMan/improvedStats
more detailed stats in user heartbeat
This commit is contained in:
commit
ad09ced3f8
4 changed files with 40 additions and 19 deletions
|
@ -858,7 +858,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
{ "gl_version_int", glVersionToInteger(glContextData.value("version").toString()) },
|
{ "gl_version_int", glVersionToInteger(glContextData.value("version").toString()) },
|
||||||
{ "gl_version", glContextData["version"] },
|
{ "gl_version", glContextData["version"] },
|
||||||
{ "gl_vender", glContextData["vendor"] },
|
{ "gl_vender", glContextData["vendor"] },
|
||||||
{ "gl_sl_version", glContextData["slVersion"] },
|
{ "gl_sl_version", glContextData["sl_version"] },
|
||||||
{ "gl_renderer", glContextData["renderer"] },
|
{ "gl_renderer", glContextData["renderer"] },
|
||||||
{ "ideal_thread_count", QThread::idealThreadCount() }
|
{ "ideal_thread_count", QThread::idealThreadCount() }
|
||||||
};
|
};
|
||||||
|
@ -1173,10 +1173,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
properties["process_memory_used"] = static_cast<qint64>(memInfo.processUsedMemoryBytes);
|
properties["process_memory_used"] = static_cast<qint64>(memInfo.processUsedMemoryBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// content location and build info - useful for filtering stats
|
||||||
|
auto addressManager = DependencyManager::get<AddressManager>();
|
||||||
|
auto currentDomain = addressManager->currentShareableAddress(true).toString(); // domain only
|
||||||
|
auto currentPath = addressManager->currentPath(true); // with orientation
|
||||||
|
properties["current_domain"] = currentDomain;
|
||||||
|
properties["current_path"] = currentPath;
|
||||||
|
properties["build_version"] = BuildInfo::VERSION;
|
||||||
|
|
||||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||||
|
|
||||||
properties["fps"] = _frameCounter.rate();
|
properties["fps"] = _frameCounter.rate();
|
||||||
properties["target_frame_rate"] = getTargetFrameRate();
|
properties["target_frame_rate"] = getTargetFrameRate();
|
||||||
|
properties["render_rate"] = displayPlugin->renderRate();
|
||||||
properties["present_rate"] = displayPlugin->presentRate();
|
properties["present_rate"] = displayPlugin->presentRate();
|
||||||
properties["new_frame_present_rate"] = displayPlugin->newFramePresentRate();
|
properties["new_frame_present_rate"] = displayPlugin->newFramePresentRate();
|
||||||
properties["dropped_frame_rate"] = displayPlugin->droppedFrameRate();
|
properties["dropped_frame_rate"] = displayPlugin->droppedFrameRate();
|
||||||
|
@ -1222,6 +1231,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
properties["active_display_plugin"] = getActiveDisplayPlugin()->getName();
|
properties["active_display_plugin"] = getActiveDisplayPlugin()->getName();
|
||||||
properties["using_hmd"] = isHMDMode();
|
properties["using_hmd"] = isHMDMode();
|
||||||
|
|
||||||
|
auto glInfo = getGLContextData();
|
||||||
|
properties["gl_info"] = glInfo;
|
||||||
|
properties["gpu_free_memory"] = (int)BYTES_TO_MB(gpu::Context::getFreeGPUMemory());
|
||||||
|
|
||||||
auto hmdHeadPose = getHMDSensorPose();
|
auto hmdHeadPose = getHMDSensorPose();
|
||||||
properties["hmd_head_pose_changed"] = isHMDMode() && (hmdHeadPose != lastHMDHeadPose);
|
properties["hmd_head_pose_changed"] = isHMDMode() && (hmdHeadPose != lastHMDHeadPose);
|
||||||
lastHMDHeadPose = hmdHeadPose;
|
lastHMDHeadPose = hmdHeadPose;
|
||||||
|
|
|
@ -35,17 +35,22 @@ int glVersionToInteger(QString glVersion) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject getGLContextData() {
|
QJsonObject getGLContextData() {
|
||||||
QString glVersion = QString((const char*)glGetString(GL_VERSION));
|
static QJsonObject result;
|
||||||
QString glslVersion = QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
static std::once_flag once;
|
||||||
QString glVendor = QString((const char*) glGetString(GL_VENDOR));
|
std::call_once(once, [] {
|
||||||
QString glRenderer = QString((const char*)glGetString(GL_RENDERER));
|
QString glVersion = QString((const char*)glGetString(GL_VERSION));
|
||||||
|
QString glslVersion = QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
|
QString glVendor = QString((const char*) glGetString(GL_VENDOR));
|
||||||
|
QString glRenderer = QString((const char*)glGetString(GL_RENDERER));
|
||||||
|
|
||||||
return QJsonObject {
|
result = QJsonObject {
|
||||||
{ "version", glVersion },
|
{ "version", glVersion },
|
||||||
{ "slVersion", glslVersion },
|
{ "sl_version", glslVersion },
|
||||||
{ "vendor", glVendor },
|
{ "vendor", glVendor },
|
||||||
{ "renderer", glRenderer },
|
{ "renderer", glRenderer },
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QThread* RENDER_THREAD = nullptr;
|
QThread* RENDER_THREAD = nullptr;
|
||||||
|
|
|
@ -47,7 +47,7 @@ bool AddressManager::isConnected() {
|
||||||
return DependencyManager::get<NodeList>()->getDomainHandler().isConnected();
|
return DependencyManager::get<NodeList>()->getDomainHandler().isConnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl AddressManager::currentAddress() const {
|
QUrl AddressManager::currentAddress(bool domainOnly) const {
|
||||||
QUrl hifiURL;
|
QUrl hifiURL;
|
||||||
|
|
||||||
hifiURL.setScheme(HIFI_URL_SCHEME);
|
hifiURL.setScheme(HIFI_URL_SCHEME);
|
||||||
|
@ -57,7 +57,9 @@ QUrl AddressManager::currentAddress() const {
|
||||||
hifiURL.setPort(_port);
|
hifiURL.setPort(_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
hifiURL.setPath(currentPath());
|
if (!domainOnly) {
|
||||||
|
hifiURL.setPath(currentPath());
|
||||||
|
}
|
||||||
|
|
||||||
return hifiURL;
|
return hifiURL;
|
||||||
}
|
}
|
||||||
|
@ -69,8 +71,7 @@ QUrl AddressManager::currentFacingAddress() const {
|
||||||
return hifiURL;
|
return hifiURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QUrl AddressManager::currentShareableAddress(bool domainOnly) const {
|
||||||
QUrl AddressManager::currentShareableAddress() const {
|
|
||||||
if (!_shareablePlaceName.isEmpty()) {
|
if (!_shareablePlaceName.isEmpty()) {
|
||||||
// if we have a shareable place name use that instead of whatever the current host is
|
// if we have a shareable place name use that instead of whatever the current host is
|
||||||
QUrl hifiURL;
|
QUrl hifiURL;
|
||||||
|
@ -78,11 +79,13 @@ QUrl AddressManager::currentShareableAddress() const {
|
||||||
hifiURL.setScheme(HIFI_URL_SCHEME);
|
hifiURL.setScheme(HIFI_URL_SCHEME);
|
||||||
hifiURL.setHost(_shareablePlaceName);
|
hifiURL.setHost(_shareablePlaceName);
|
||||||
|
|
||||||
hifiURL.setPath(currentPath());
|
if (!domainOnly) {
|
||||||
|
hifiURL.setPath(currentPath());
|
||||||
|
}
|
||||||
|
|
||||||
return hifiURL;
|
return hifiURL;
|
||||||
} else {
|
} else {
|
||||||
return currentAddress();
|
return currentAddress(domainOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,9 @@ public:
|
||||||
bool isConnected();
|
bool isConnected();
|
||||||
const QString& getProtocol() { return HIFI_URL_SCHEME; };
|
const QString& getProtocol() { return HIFI_URL_SCHEME; };
|
||||||
|
|
||||||
QUrl currentAddress() const;
|
QUrl currentAddress(bool domainOnly = false) const;
|
||||||
QUrl currentFacingAddress() const;
|
QUrl currentFacingAddress() const;
|
||||||
QUrl currentShareableAddress() const;
|
QUrl currentShareableAddress(bool domainOnly = false) const;
|
||||||
QUrl currentFacingShareableAddress() const;
|
QUrl currentFacingShareableAddress() const;
|
||||||
QString currentPath(bool withOrientation = true) const;
|
QString currentPath(bool withOrientation = true) const;
|
||||||
QString currentFacingPath() const;
|
QString currentFacingPath() const;
|
||||||
|
|
Loading…
Reference in a new issue