mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 09:15:42 +01:00
telemetry_session: Use TelemetryJson to submit real telemetry.
This commit is contained in:
parent
fd3b4451ec
commit
8af3ebb149
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
#include "common/scm_rev.h"
|
#include "common/scm_rev.h"
|
||||||
#include "core/telemetry_session.h"
|
#include "core/telemetry_session.h"
|
||||||
|
#include "web_services/telemetry_json.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
TelemetrySession::TelemetrySession() {
|
TelemetrySession::TelemetrySession() {
|
||||||
// TODO(bunnei): Replace with a backend that logs to our web service
|
backend = std::make_unique<WebService::TelemetryJson>();
|
||||||
backend = std::make_unique<Telemetry::NullVisitor>();
|
|
||||||
|
|
||||||
// Log one-time session start information
|
// Log one-time session start information
|
||||||
const auto duration{std::chrono::steady_clock::now().time_since_epoch()};
|
const auto duration{std::chrono::steady_clock::now().time_since_epoch()};
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
namespace WebService {
|
namespace WebService {
|
||||||
|
|
||||||
TelemetryJson::TelemetryJson() {}
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) {
|
void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) {
|
||||||
sections[static_cast<u8>(type)][name] = value;
|
sections[static_cast<u8>(type)][name] = value;
|
||||||
|
@ -17,7 +17,7 @@ namespace WebService {
|
|||||||
*/
|
*/
|
||||||
class TelemetryJson : public Telemetry::VisitorInterface {
|
class TelemetryJson : public Telemetry::VisitorInterface {
|
||||||
public:
|
public:
|
||||||
TelemetryJson();
|
TelemetryJson() = default;
|
||||||
~TelemetryJson() = default;
|
~TelemetryJson() = default;
|
||||||
|
|
||||||
void Visit(const Telemetry::Field<bool>& field) override;
|
void Visit(const Telemetry::Field<bool>& field) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user