diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-03-10 17:49:06 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-03-10 17:49:06 +0000 |
commit | 92a17bf53b33050402c292c22614b361dba0e292 (patch) | |
tree | 59a0c5bb8331fa2f12f50c490c14c7edaf8deb19 | |
parent | 89bd4269018fa5a36a15eac8d2c3f99674d18b2d (diff) |
SL-14862 - tab logging
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 3 | ||||
-rw-r--r-- | indra/llui/lluiusage.cpp | 27 | ||||
-rw-r--r-- | indra/llui/lluiusage.h | 7 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 3 |
4 files changed, 35 insertions, 5 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index e6b43da8e5..459fdcf2ae 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -38,6 +38,7 @@ #include "llrender.h" #include "llfloater.h" #include "lltrans.h" +#include "lluiusage.h" //---------------------------------------------------------------------------- @@ -1556,6 +1557,8 @@ BOOL LLTabContainer::setTab(S32 which) if (is_selected) { + LLUIUsage::instance().logPanel(tuple->mTabPanel->getName()); + // Make sure selected tab is within scroll region if (mIsVertical) { diff --git a/indra/llui/lluiusage.cpp b/indra/llui/lluiusage.cpp index 824c59730b..c0d945438f 100644 --- a/indra/llui/lluiusage.cpp +++ b/indra/llui/lluiusage.cpp @@ -75,16 +75,22 @@ void LLUIUsage::setLLSDNested(LLSD& sd, const std::string& path, S32 max_elts, S } } +void LLUIUsage::logCommand(const std::string& command) +{ + mCommandCounts[sanitized(command)]++; + LL_DEBUGS("UIUsage") << "command " << command << LL_ENDL; +} + void LLUIUsage::logFloater(const std::string& floater) { mFloaterCounts[sanitized(floater)]++; LL_DEBUGS("UIUsage") << "floater " << floater << LL_ENDL; } -void LLUIUsage::logCommand(const std::string& command) +void LLUIUsage::logPanel(const std::string& p) { - mCommandCounts[sanitized(command)]++; - LL_DEBUGS("UIUsage") << "command " << command << LL_ENDL; + mPanelCounts[sanitized(p)]++; + LL_DEBUGS("UIUsage") << "panel " << p << LL_ENDL; } void LLUIUsage::logWidget(const std::string& w) @@ -104,6 +110,10 @@ LLSD LLUIUsage::asLLSD() const { result["commands"][it.first] = LLSD::Integer(it.second); } + for (auto const& it : mPanelCounts) + { + result["panels"][it.first] = LLSD::Integer(it.second); + } for (auto const& it : mWidgetCounts) { setLLSDNested(result["widgets"], it.first, 2, it.second); @@ -111,3 +121,14 @@ LLSD LLUIUsage::asLLSD() const return result; } +// Clear up some junk content generated during initial login/UI initialization +void LLUIUsage::clear() +{ + + LL_DEBUGS("UIUsage") << "clear" << LL_ENDL; + mCommandCounts.clear(); + mFloaterCounts.clear(); + mPanelCounts.clear(); + mWidgetCounts.clear(); +} + diff --git a/indra/llui/lluiusage.h b/indra/llui/lluiusage.h index 956e184edc..df7360c210 100644 --- a/indra/llui/lluiusage.h +++ b/indra/llui/lluiusage.h @@ -40,13 +40,16 @@ public: public: static std::string sanitized(const std::string& s); void setLLSDNested(LLSD& sd, const std::string& path, S32 max_elts, S32 val) const; - void logFloater(const std::string& floater); void logCommand(const std::string& command); + void logFloater(const std::string& floater); + void logPanel(const std::string& p); void logWidget(const std::string& w); LLSD asLLSD() const; + void clear(); private: - std::map<std::string,U32> mFloaterCounts; std::map<std::string,U32> mCommandCounts; + std::map<std::string,U32> mFloaterCounts; + std::map<std::string,U32> mPanelCounts; std::map<std::string,U32> mWidgetCounts; }; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 17777c3ceb..b458582fa8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -142,6 +142,7 @@ #include "lltoolmgr.h" #include "lltrans.h" #include "llui.h" +#include "lluiusage.h" #include "llurldispatcher.h" #include "llurlentry.h" #include "llslurl.h" @@ -2257,6 +2258,8 @@ bool idle_startup() gAgentAvatarp->sendHoverHeight(); + LLUIUsage::instance().clear(); + return TRUE; } |