summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-02-14 16:37:11 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-02-14 16:37:11 +0200
commitffc64187940c5df230d9dcead5c8716c10f109a9 (patch)
treeb0a0026442c8cdfbe00a60a0b8c7d53dd1ce26f2 /indra/newview
parent00a6c069f21a7dcde52247e8bdf902e50369cc00 (diff)
SL-10545 Provide summary memory information in Top Scripts
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatertopobjects.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/floater_top_objects.xml2
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 9b5b3a0fc9..bd49405f34 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -143,6 +143,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
U32 request_flags;
U32 total_count;
+ U64 total_memory = 0;
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_RequestFlags, request_flags);
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_TotalObjectCount, total_count);
@@ -190,6 +191,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
parcel_buf = parcel_name;
script_memory = script_size;
+ total_memory += script_size;
}
}
@@ -263,8 +265,10 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
setTitle(getString("top_scripts_title"));
list->setColumnLabel("score", getString("scripts_score_label"));
-
+
LLUIString format = getString("top_scripts_text");
+ total_memory /= 1024;
+ format.setArg("[MEMORY]", llformat("%ld", total_memory));
format.setArg("[COUNT]", llformat("%d", total_count));
format.setArg("[TIME]", llformat("%0.3f", mtotalScore));
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml
index ceef541290..b82fe43e74 100644
--- a/indra/newview/skins/default/xui/en/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml
@@ -16,7 +16,7 @@
</floater.string>
<floater.string
name="top_scripts_text">
- [COUNT] scripts taking a total of [TIME] ms
+ [COUNT] scripts taking a total of [TIME] ms and using [MEMORY] KB
</floater.string>
<floater.string
name="scripts_score_label">