Index: ps/trunk/binaries/data/mods/public/gui/manual/userreport.txt =================================================================== --- ps/trunk/binaries/data/mods/public/gui/manual/userreport.txt +++ ps/trunk/binaries/data/mods/public/gui/manual/userreport.txt @@ -5,7 +5,6 @@ • A random user ID (stored in %APPDATA%\\0ad\\config\\user.cfg on Windows, ~/.config/0ad/config/user.cfg on Unix), to let us detect repeated reports from the same user. • Game version number and basic build settings (optimisation mode, CPU architecture, timestamp, compiler version). • Hardware details: OS version, graphics driver version, OpenGL capabilities, screen size, CPU details, RAM size. -• Performance details: a snapshot of timing data a few seconds after you start a match or change graphics settings. The data will only be a few kilobytes each time you run the game, so bandwidth usage is minimal. Index: ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js +++ ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js @@ -79,14 +79,6 @@ } } -function submitUserReportMessage() -{ - let input = Engine.GetGUIObjectByName("userReportMessageInput"); - if (input.caption.length) - Engine.SubmitUserReport("message", 1, input.caption); - input.caption = ""; -} - function formatUserReportStatus(status) { let d = status.split(/:/, 3); Index: ps/trunk/binaries/data/mods/public/gui/session/session.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/session.js +++ ps/trunk/binaries/data/mods/public/gui/session/session.js @@ -287,16 +287,6 @@ sendLobbyPlayerlistUpdate(); onSimulationUpdate(); setTimeout(displayGamestateNotifications, 1000); - - // Report the performance after 5 seconds (when we're still near - // the initial camera view) and a minute (when the profiler will - // have settled down if framerates as very low), to give some - // extremely rough indications of performance - // - // DISABLED: this information isn't currently useful for anything much, - // and it generates a massive amount of data to transmit and store - // setTimeout(function() { reportPerformance(5); }, 5000); - // setTimeout(function() { reportPerformance(60); }, 60000); } function initGUIObjects() @@ -713,18 +703,6 @@ Engine.GetGUIObjectByName("lobbyButton").enabled = Engine.HasXmppClient(); } -function reportPerformance(time) -{ - let settings = g_GameAttributes.settings; - Engine.SubmitUserReport("profile", 3, JSON.stringify({ - "time": time, - "map": settings.Name, - "seed": settings.Seed, // only defined for random maps - "size": settings.Size, // only defined for random maps - "profiler": Engine.GetProfilerState() - })); -} - /** * Resign a player. * @param leaveGameAfterResign If player is quitting after resignation. Index: ps/trunk/source/ps/ProfileViewer.h =================================================================== --- ps/trunk/source/ps/ProfileViewer.h +++ ps/trunk/source/ps/ProfileViewer.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2018 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -188,12 +188,6 @@ void SaveToFile(); /** - * SaveToJS: Return a script value containing the current profiler data - * (for all profile tables). - */ - JS::Value SaveToJS(const ScriptInterface& scriptInterface); - - /** * ShowTable: Set the named profile table to be the displayed one. If it * is not found, no profile is displayed. * Index: ps/trunk/source/ps/ProfileViewer.cpp =================================================================== --- ps/trunk/source/ps/ProfileViewer.cpp +++ ps/trunk/source/ps/ProfileViewer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2018 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -600,21 +600,6 @@ m->outputStream.flush(); } -JS::Value CProfileViewer::SaveToJS(const ScriptInterface& scriptInterface) -{ - JSContext* cx = scriptInterface.GetContext(); - JSAutoRequest rq(cx); - - JS::RootedValue root(cx); - scriptInterface.Eval("({})", &root); - - std::vector tables = m->rootTables; - sort(tables.begin(), tables.end(), SortByName); - for_each(tables.begin(), tables.end(), DumpTable(scriptInterface, root)); - - return root; -} - void CProfileViewer::ShowTable(const CStr& table) { m->path.clear(); Index: ps/trunk/source/ps/scripting/JSInterface_Debug.h =================================================================== --- ps/trunk/source/ps/scripting/JSInterface_Debug.h +++ ps/trunk/source/ps/scripting/JSInterface_Debug.h @@ -25,11 +25,9 @@ int Crash(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)); void DebugWarn(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)); void DisplayErrorDialog(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& msg); - JS::Value GetProfilerState(ScriptInterface::CxPrivate* pCxPrivate); bool IsUserReportEnabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)); void SetUserReportEnabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool enabled); std::string GetUserReportStatus(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)); - void SubmitUserReport(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::string& type, int version, const std::wstring& data); std::wstring GetBuildTimestamp(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), int mode); double GetMicroseconds(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)); Index: ps/trunk/source/ps/scripting/JSInterface_Debug.cpp =================================================================== --- ps/trunk/source/ps/scripting/JSInterface_Debug.cpp +++ ps/trunk/source/ps/scripting/JSInterface_Debug.cpp @@ -55,11 +55,6 @@ debug_DisplayError(msg.c_str(), DE_NO_DEBUG_INFO, NULL, NULL, NULL, 0, NULL, NULL); } -JS::Value JSI_Debug::GetProfilerState(ScriptInterface::CxPrivate* pCxPrivate) -{ - return g_ProfileViewer.SaveToJS(*(pCxPrivate->pScriptInterface)); -} - // Return the date/time at which the current executable was compiled. // params: mode OR an integer specifying // what to display: -1 for "date time (svn revision)", 0 for date, 1 for time, 2 for svn revision @@ -137,23 +132,16 @@ return g_UserReporter.GetStatus(); } -void JSI_Debug::SubmitUserReport(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::string& type, int version, const std::wstring& data) -{ - g_UserReporter.SubmitReport(type.c_str(), version, utf8_from_wstring(data)); -} - void JSI_Debug::RegisterScriptFunctions(const ScriptInterface& scriptInterface) { scriptInterface.RegisterFunction("GetMicroseconds"); scriptInterface.RegisterFunction("Crash"); scriptInterface.RegisterFunction("DebugWarn"); scriptInterface.RegisterFunction("DisplayErrorDialog"); - scriptInterface.RegisterFunction("GetProfilerState"); scriptInterface.RegisterFunction("GetBuildTimestamp"); // User report functions scriptInterface.RegisterFunction("IsUserReportEnabled"); scriptInterface.RegisterFunction("SetUserReportEnabled"); scriptInterface.RegisterFunction("GetUserReportStatus"); - scriptInterface.RegisterFunction("SubmitUserReport"); }