diff options
| author | 2017-07-12 21:31:12 -0400 | |
|---|---|---|
| committer | 2017-07-12 21:31:12 -0400 | |
| commit | 9cf261ba8ba4fd9929d275cc793d48d13df624f3 (patch) | |
| tree | 2eb47ab96bde081a84c5dd7c8107a21cb8a3511c /src/core/telemetry_session.cpp | |
| parent | Merge pull request #2815 from mailwl/bossp (diff) | |
| parent | web_backend: Specify api-version on JSON post. (diff) | |
| download | yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.gz yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.xz yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.zip | |
Merge pull request #2819 from bunnei/telemetry-submit
Telemetry: Submit logged data to the Citra service
Diffstat (limited to 'src/core/telemetry_session.cpp')
| -rw-r--r-- | src/core/telemetry_session.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index ddc8b262e..70eff4340 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -7,12 +7,18 @@ | |||
| 7 | #include "common/scm_rev.h" | 7 | #include "common/scm_rev.h" |
| 8 | #include "core/telemetry_session.h" | 8 | #include "core/telemetry_session.h" |
| 9 | 9 | ||
| 10 | #ifdef ENABLE_WEB_SERVICE | ||
| 11 | #include "web_service/telemetry_json.h" | ||
| 12 | #endif | ||
| 13 | |||
| 10 | namespace Core { | 14 | namespace Core { |
| 11 | 15 | ||
| 12 | TelemetrySession::TelemetrySession() { | 16 | TelemetrySession::TelemetrySession() { |
| 13 | // TODO(bunnei): Replace with a backend that logs to our web service | 17 | #ifdef ENABLE_WEB_SERVICE |
| 18 | backend = std::make_unique<WebService::TelemetryJson>(); | ||
| 19 | #else | ||
| 14 | backend = std::make_unique<Telemetry::NullVisitor>(); | 20 | backend = std::make_unique<Telemetry::NullVisitor>(); |
| 15 | 21 | #endif | |
| 16 | // Log one-time session start information | 22 | // Log one-time session start information |
| 17 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; | 23 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; |
| 18 | const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; | 24 | const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; |