summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@gmail.com>2021-02-03 09:31:32 -0800
committerCallum Prentice <callum@gmail.com>2021-02-03 09:31:32 -0800
commitd26567915cd80999260edffc41df467a7cbbd80c (patch)
tree84072d2a7a5e6afa7b57850ed4b325439cb2be16 /indra/newview/llviewerstats.cpp
parent7528855442a100cee379b9e409280a69caa78bba (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge with Master after Viewer release
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r--indra/newview/llviewerstats.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 7ea702b0c9..35fb4de5a9 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -59,6 +59,7 @@
#include "llviewernetwork.h"
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
#include "llsdserialize.h"
+#include "llsdutil.h"
#include "llcorehttputil.h"
#include "llvoicevivox.h"
@@ -422,7 +423,7 @@ void update_statistics()
* If you move stats around here, make the corresponding changes in
* those locations, too.
*/
-void send_stats()
+void send_viewer_stats(bool include_preferences)
{
// IW 9/23/02 I elected not to move this into LLViewerStats
// because it depends on too many viewer.cpp globals.
@@ -510,6 +511,8 @@ void send_stats()
system["gpu_version"] = gGLManager.mDriverVersionVendorString;
system["opengl_version"] = gGLManager.mGLVersionString;
+ gGLManager.asLLSD(system["gl"]);
+
S32 shader_level = 0;
if (LLPipeline::sRenderDeferred)
{
@@ -569,6 +572,7 @@ void send_stats()
fail["failed_resends"] = (S32) gMessageSystem->mFailedResendPackets;
fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets;
fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets;
+ fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing();
body["stats"]["voice"] = LLVoiceVivoxStats::getInstance()->read();
@@ -614,10 +618,25 @@ void send_stats()
body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames");
body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames");
-
+
+ // Preferences
+ if (include_preferences)
+ {
+ bool diffs_only = true; // only log preferences that differ from default
+ body["preferences"]["settings"] = gSavedSettings.asLLSD(diffs_only);
+ body["preferences"]["settings_per_account"] = gSavedPerAccountSettings.asLLSD(diffs_only);
+ }
+
body["MinimalSkin"] = false;
+
LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL;
+ if (debugLoggingEnabled("LogViewerStatsPacket"))
+ {
+ std::string filename("viewer_stats_packet.xml");
+ llofstream of(filename.c_str());
+ LLSDSerialize::toPrettyXML(body,of);
+ }
// The session ID token must never appear in logs
body["session_id"] = gAgentSessionID;