Add telemetry field for mean frametime

Previously, telemetry results couldn't give a good estimate for
performance over time, because it didn't include any fields related to
performance. With this, devs should be able to query metabase for mean
frametime to check for performance regressions after a change is made.
This commit is contained in:
James Rowe 2019-08-12 22:21:37 -06:00
parent 62e6c147ae
commit 45be693f8c
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ TelemetrySession::~TelemetrySession() {
std::chrono::system_clock::now().time_since_epoch())
.count()};
AddField(Telemetry::FieldType::Session, "Shutdown_Time", shutdown_time);
AddField(Telemetry::FieldType::Session, "Mean_Frametime_MS",
Core::System::GetInstance().perf_stats->GetMeanFrametime());
#ifdef ENABLE_WEB_SERVICE
auto backend = std::make_unique<WebService::TelemetryJson>(Settings::values.web_api_url,