Add: track savegame size to report with survey (#12304)

This commit is contained in:
Patric Stout
2024-03-16 08:58:56 +01:00
committed by GitHub
parent b394c20519
commit 3e625b5b1a
12 changed files with 48 additions and 17 deletions

View File

@@ -19,8 +19,6 @@
#include "../safeguards.h"
extern std::string _savegame_id;
NetworkSurveyHandler _survey = {};
NLOHMANN_JSON_SERIALIZE_ENUM(NetworkSurveyHandler::Reason, {
@@ -43,7 +41,6 @@ std::string NetworkSurveyHandler::CreatePayload(Reason reason, bool for_preview)
survey["schema"] = NETWORK_SURVEY_VERSION;
survey["reason"] = reason;
survey["id"] = _savegame_id;
survey["date"] = fmt::format("{:%Y-%m-%d %H:%M:%S} (UTC)", fmt::gmtime(time(nullptr)));
#ifdef SURVEY_KEY
@@ -53,6 +50,8 @@ std::string NetworkSurveyHandler::CreatePayload(Reason reason, bool for_preview)
survey["key"] = "";
#endif
SurveyGameSession(survey["session"]);
{
auto &info = survey["info"];
SurveyOS(info["os"]);