SL-18119 - UIUsage logs for some common operations

meow-7.2.2
Brad Payne (Vir Linden) 2022-09-16 17:09:55 +01:00
parent d31a83fb94
commit 56e1db9c15
6 changed files with 35 additions and 5 deletions

View File

@ -30,7 +30,7 @@
#include "llerror.h"
// maximum reference count before sounding memory leak alarm
const S32 gMaxRefCount = 65536;
const S32 gMaxRefCount = S32_MAX;
LLRefCount::LLRefCount(const LLRefCount& other)
: mRef(0)

View File

@ -60,6 +60,7 @@
#include "llappviewer.h"
#include "llcoros.h"
#include "lleventcoro.h"
#include "lluiusage.h"
#include "llavatarpropertiesprocessor.h"
@ -1426,6 +1427,9 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
bool replace,
LLPointer<LLInventoryCallback> cb)
{
LL_DEBUGS("UIUsage") << "wearItemsOnAvatar" << LL_ENDL;
LLUIUsage::instance().logCommand("Avatar.WearItem");
bool first = true;
LLInventoryObject::const_object_list_t items_to_link;
@ -2761,6 +2765,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar '" << category->getName()
<< "'" << LL_ENDL;
LLUIUsage::instance().logCommand("Avatar.WearCategory");
if (gAgentCamera.cameraCustomizeAvatar())
{
@ -4006,6 +4011,9 @@ void LLAppearanceMgr::wearBaseOutfit()
void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
{
LL_DEBUGS("UIUsage") << "removeItemsFromAvatar" << LL_ENDL;
LLUIUsage::instance().logCommand("Avatar.RemoveItem");
if (ids_to_remove.empty())
{
LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL;

View File

@ -568,8 +568,6 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
// how to chat
gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE);
LLUIUsage::instance().logCommand("Chat.Send"); // Pseudo-command
// Look for "/20 foo" channel chats.
S32 channel = 0;
LLWString out_text = stripChannelNumber(wtext, &channel);

View File

@ -698,7 +698,6 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, ECha
void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
{
LLUIUsage::instance().logCommand("Chat.Send"); // pseuo-command
// Look for "/20 foo" channel chats.
S32 channel = 0;
LLWString out_text = stripChannelNumber(wtext, &channel);
@ -858,6 +857,12 @@ LLWString LLFloaterIMNearbyChat::stripChannelNumber(const LLWString &mesg, S32*
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
{
LL_DEBUGS("UIUsage") << "Nearby chat, text " << utf8_out_text << " type " << type << " channel " << channel << LL_ENDL;
if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) // prune back some redundant logging
{
LLUIUsage::instance().logCommand("Chat.SendNearby"); // pseuo-command
}
LLMessageSystem* msg = gMessageSystem;
if (channel >= 0)

View File

@ -69,7 +69,7 @@
#include "message.h"
#include "llviewerregion.h"
#include "llcorehttputil.h"
#include "lluiusage.h"
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@ -781,6 +781,23 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f
message["index"] = (LLSD::Integer)mMsgs.size();
message["is_history"] = is_history;
LL_DEBUGS("UIUsage") << "addMessage " << " from " << from << " from_id " << from_id << " utf8_text " << utf8_text << " time " << time << " is_history " << is_history << " session mType " << mType << LL_ENDL;
if (from_id == gAgent.getID())
{
if (mType == IM_SESSION_GROUP_START)
{
LLUIUsage::instance().logCommand("Chat.SendGroup");
}
else if (mType == IM_NOTHING_SPECIAL)
{
LLUIUsage::instance().logCommand("Chat.SendIM");
}
else
{
LLUIUsage::instance().logCommand("Chat.SendOther");
}
}
mMsgs.push_front(message);
if (mSpeakers && from_id.notNull())

View File

@ -67,6 +67,7 @@
#include "llsdserialize.h"
#include "llcallstack.h"
#include "llcorehttputil.h"
#include "lluiusage.h"
#if LL_MSVC
// disable boost::lexical_cast warning
@ -2663,6 +2664,7 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch)
{
if (isAgentAvatarValid())
{
LLUIUsage::instance().logCommand("Avatar.CustomizeStart");
if (!gAgentAvatarp->mEndCustomizeCallback.get())
{
gAgentAvatarp->mEndCustomizeCallback = new LLUpdateAppearanceOnDestroy;