diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-18 20:21:50 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-18 21:08:32 +0200 |
commit | f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4 (patch) | |
tree | 6ba40b5d404c76f1f8be55f0e592afab83ab6563 /src/core | |
parent | Merge pull request #4381 from Morph1984/fix-open-folder-installed-title (diff) | |
download | yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar.gz yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar.bz2 yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar.lz yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar.xz yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.tar.zst yuzu-f6bb905182b31a4ee4ccffe7d56b8743cf0ca3b4.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.cpp | 12 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 2 | ||||
-rw-r--r-- | src/core/telemetry_session.h | 5 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 1d8c0f1cd..c2c0eec0b 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -269,14 +269,14 @@ struct System::Impl { // Log last frame performance stats if game was loded if (perf_stats) { const auto perf_results = GetAndResetPerfStats(); - telemetry_session->AddField(Telemetry::FieldType::Performance, - "Shutdown_EmulationSpeed", + constexpr auto performance = Common::Telemetry::FieldType::Performance; + + telemetry_session->AddField(performance, "Shutdown_EmulationSpeed", perf_results.emulation_speed * 100.0); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Framerate", - perf_results.game_fps); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Frametime", + telemetry_session->AddField(performance, "Shutdown_Framerate", perf_results.game_fps); + telemetry_session->AddField(performance, "Shutdown_Frametime", perf_results.frametime * 1000.0); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Mean_Frametime_MS", + telemetry_session->AddField(performance, "Mean_Frametime_MS", perf_stats->GetMeanFrametime()); } diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 7dae48bc6..da09c0dbc 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -25,6 +25,8 @@ namespace Core { +namespace Telemetry = Common::Telemetry; + static u64 GenerateTelemetryId() { u64 telemetry_id{}; diff --git a/src/core/telemetry_session.h b/src/core/telemetry_session.h index 17ac22377..66789d4bd 100644 --- a/src/core/telemetry_session.h +++ b/src/core/telemetry_session.h @@ -52,7 +52,7 @@ public: * @param value Value for the field to add. */ template <typename T> - void AddField(Telemetry::FieldType type, const char* name, T value) { + void AddField(Common::Telemetry::FieldType type, const char* name, T value) { field_collection.AddField(type, name, std::move(value)); } @@ -63,7 +63,8 @@ public: bool SubmitTestcase(); private: - Telemetry::FieldCollection field_collection; ///< Tracks all added fields for the session + /// Tracks all added fields for the session + Common::Telemetry::FieldCollection field_collection; }; /** |