diff options
| author | 2017-07-09 13:49:51 -0400 | |
|---|---|---|
| committer | 2017-07-11 18:33:40 -0400 | |
| commit | 8af3ebb149b057b40bc4efd5bae2b9cb70b2066c (patch) | |
| tree | 3625b4fe08f9c336879f244a298305c058cff1d2 | |
| parent | web_service: Implement JSON serialization of telemetry data. (diff) | |
| download | yuzu-8af3ebb149b057b40bc4efd5bae2b9cb70b2066c.tar.gz yuzu-8af3ebb149b057b40bc4efd5bae2b9cb70b2066c.tar.xz yuzu-8af3ebb149b057b40bc4efd5bae2b9cb70b2066c.zip | |
telemetry_session: Use TelemetryJson to submit real telemetry.
Diffstat (limited to '')
| -rw-r--r-- | src/core/telemetry_session.cpp | 4 | ||||
| -rw-r--r-- | src/web_service/telemetry_json.cpp | 2 | ||||
| -rw-r--r-- | src/web_service/telemetry_json.h | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index ddc8b262e..1ba0a698d 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -6,12 +6,12 @@ | |||
| 6 | 6 | ||
| 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 | #include "web_services/telemetry_json.h" | ||
| 9 | 10 | ||
| 10 | namespace Core { | 11 | namespace Core { |
| 11 | 12 | ||
| 12 | TelemetrySession::TelemetrySession() { | 13 | TelemetrySession::TelemetrySession() { |
| 13 | // TODO(bunnei): Replace with a backend that logs to our web service | 14 | backend = std::make_unique<WebService::TelemetryJson>(); |
| 14 | backend = std::make_unique<Telemetry::NullVisitor>(); | ||
| 15 | 15 | ||
| 16 | // Log one-time session start information | 16 | // Log one-time session start information |
| 17 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; | 17 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; |
diff --git a/src/web_service/telemetry_json.cpp b/src/web_service/telemetry_json.cpp index c61522ff1..a2d007e77 100644 --- a/src/web_service/telemetry_json.cpp +++ b/src/web_service/telemetry_json.cpp | |||
| @@ -9,8 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | namespace WebService { | 10 | namespace WebService { |
| 11 | 11 | ||
| 12 | TelemetryJson::TelemetryJson() {} | ||
| 13 | |||
| 14 | template <class T> | 12 | template <class T> |
| 15 | void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) { | 13 | void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) { |
| 16 | sections[static_cast<u8>(type)][name] = value; | 14 | sections[static_cast<u8>(type)][name] = value; |
diff --git a/src/web_service/telemetry_json.h b/src/web_service/telemetry_json.h index cc511cdd1..39038b4f9 100644 --- a/src/web_service/telemetry_json.h +++ b/src/web_service/telemetry_json.h | |||
| @@ -17,7 +17,7 @@ namespace WebService { | |||
| 17 | */ | 17 | */ |
| 18 | class TelemetryJson : public Telemetry::VisitorInterface { | 18 | class TelemetryJson : public Telemetry::VisitorInterface { |
| 19 | public: | 19 | public: |
| 20 | TelemetryJson(); | 20 | TelemetryJson() = default; |
| 21 | ~TelemetryJson() = default; | 21 | ~TelemetryJson() = default; |
| 22 | 22 | ||
| 23 | void Visit(const Telemetry::Field<bool>& field) override; | 23 | void Visit(const Telemetry::Field<bool>& field) override; |