From b3e9c46c94dad0c81a5adcb9152521b5368c66a7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Aug 2012 22:50:56 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages further cleanup of LLStat removed llfloaterlagmeter --- indra/llcommon/llstat.cpp | 84 +---- indra/llcommon/llstat.h | 31 +- indra/llui/llstatbar.cpp | 2 +- indra/llui/llstatbar.h | 6 +- indra/newview/CMakeLists.txt | 2 - indra/newview/llfloaterlagmeter.cpp | 375 --------------------- indra/newview/llfloaterlagmeter.h | 80 ----- indra/newview/llstatusbar.cpp | 1 - indra/newview/llviewerassetstats.cpp | 4 +- indra/newview/llviewerfloaterreg.cpp | 2 - indra/newview/llviewerstats.cpp | 150 ++++----- indra/newview/llviewerstats.h | 50 ++- indra/newview/llviewertexturelist.cpp | 12 +- indra/newview/llvoavatarself.cpp | 4 +- indra/newview/llworld.cpp | 2 +- .../skins/default/xui/da/floater_lagmeter.xml | 151 --------- .../skins/default/xui/de/floater_lagmeter.xml | 151 --------- .../skins/default/xui/en/floater_lagmeter.xml | 336 ------------------ .../skins/default/xui/es/floater_lagmeter.xml | 154 --------- .../skins/default/xui/fr/floater_lagmeter.xml | 151 --------- .../skins/default/xui/it/floater_lagmeter.xml | 154 --------- .../skins/default/xui/ja/floater_lagmeter.xml | 151 --------- .../skins/default/xui/pl/floater_lagmeter.xml | 151 --------- .../skins/default/xui/pt/floater_lagmeter.xml | 154 --------- .../skins/default/xui/ru/floater_lagmeter.xml | 151 --------- .../skins/default/xui/tr/floater_lagmeter.xml | 151 --------- .../skins/default/xui/zh/floater_lagmeter.xml | 151 --------- 27 files changed, 131 insertions(+), 2680 deletions(-) delete mode 100644 indra/newview/llfloaterlagmeter.cpp delete mode 100644 indra/newview/llfloaterlagmeter.h delete mode 100644 indra/newview/skins/default/xui/da/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/de/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/fr/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/it/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/ja/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/pt/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/ru/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/tr/floater_lagmeter.xml delete mode 100644 indra/newview/skins/default/xui/zh/floater_lagmeter.xml diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index 3678c8e1c1..b46d2e58b2 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -51,9 +51,10 @@ void LLStat::reset() mNextBin = 0; } -LLStat::LLStat(std::string name, S32 num_bins, BOOL use_frame_timer) -: mUseFrameTimer(use_frame_timer), - mNumBins(num_bins), +LLStat::LLStat(std::string name, BOOL use_frame_timer) +: LLInstanceTracker(name), + mUseFrameTimer(use_frame_timer), + mNumBins(50), mName(name), mBins(NULL) { @@ -61,48 +62,24 @@ LLStat::LLStat(std::string name, S32 num_bins, BOOL use_frame_timer) mLastTime = 0.f; reset(); - - if (!mName.empty()) - { - stat_map_t::iterator iter = getStatList().find(mName); - if (iter != getStatList().end()) - llwarns << "LLStat with duplicate name: " << mName << llendl; - getStatList().insert(std::make_pair(mName, this)); - } -} - -LLStat::stat_map_t& LLStat::getStatList() -{ - static LLStat::stat_map_t stat_list; - return stat_list; } - LLStat::~LLStat() { delete[] mBins; - - if (!mName.empty()) - { - // handle multiple entries with the same name - stat_map_t::iterator iter = getStatList().find(mName); - while (iter != getStatList().end() && iter->second != this) - ++iter; - getStatList().erase(iter); - } -} - -void LLStat::start() -{ - if (mUseFrameTimer) - { - mBins[mNextBin].mBeginTime = sFrameTimer.getElapsedSeconds(); - } - else - { - mBins[mNextBin].mBeginTime = sTimer.getElapsedTimeF64(); - } } +// +//void LLStat::start() +//{ +// if (mUseFrameTimer) +// { +// mBins[mNextBin].mBeginTime = sFrameTimer.getElapsedSeconds(); +// } +// else +// { +// mBins[mNextBin].mBeginTime = sTimer.getElapsedTimeF64(); +// } +//} void LLStat::addValue(const F32 value) { @@ -299,31 +276,6 @@ F32 LLStat::getMeanPerSec() const } } -F32 LLStat::getMeanDuration() const -{ - F32 dur = 0.0f; - S32 count = 0; - for (S32 i=0; (i < mNumBins) && (i < mNumValues); i++) - { - if (i == mNextBin) - { - continue; - } - dur += mBins[i].mDT; - count++; - } - - if (count > 0) - { - dur /= F32(count); - return dur; - } - else - { - return 0.f; - } -} - F32 LLStat::getMaxPerSec() const { F32 value; @@ -398,7 +350,3 @@ S32 LLStat::getNextBin() const return mNextBin; } -F64 LLStat::getLastTime() const -{ - return mLastTime; -} diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h index 38377a010b..82a246275d 100644 --- a/indra/llcommon/llstat.h +++ b/indra/llcommon/llstat.h @@ -31,22 +31,18 @@ #include "lltimer.h" #include "llframetimer.h" +#include "llinstancetracker.h" class LLSD; // ---------------------------------------------------------------------------- -class LL_COMMON_API LLStat +class LL_COMMON_API LLStat : public LLInstanceTracker { -private: - typedef std::multimap stat_map_t; - - static stat_map_t& getStatList(); - public: - LLStat(std::string name = std::string(), S32 num_bins = 32, BOOL use_frame_timer = FALSE); + LLStat(std::string name = std::string(), BOOL use_frame_timer = FALSE); ~LLStat(); - void start(); // Start the timer for the current "frame", otherwise uses the time tracked from + //void start(); // Start the timer for the current "frame", otherwise uses the time tracked from // the last addValue void reset(); void addValue(const F32 value = 1.f); // Adds the current value being tracked, and tracks the DT. @@ -57,23 +53,24 @@ public: F32 getPrev(S32 age) const; // Age is how many "addValues" previously - zero is current F32 getPrevPerSec(S32 age) const; // Age is how many "addValues" previously - zero is current + F32 getCurrent() const; F32 getCurrentPerSec() const; F32 getMin() const; F32 getMinPerSec() const; + F32 getMean() const; F32 getMeanPerSec() const; - F32 getMeanDuration() const; + F32 getMax() const; F32 getMaxPerSec() const; U32 getNumValues() const; S32 getNumBins() const; - F64 getLastTime() const; private: - BOOL mUseFrameTimer; + bool mUseFrameTimer; U32 mNumValues; U32 mNumBins; F32 mLastValue; @@ -93,6 +90,7 @@ private: F32 mDT; }; ValueEntry* mBins; + S32 mCurBin; S32 mNextBin; @@ -100,17 +98,6 @@ private: static LLTimer sTimer; static LLFrameTimer sFrameTimer; - -public: - static LLStat* getStat(const std::string& name) - { - // return the first stat that matches 'name' - stat_map_t::iterator iter = getStatList().find(name); - if (iter != getStatList().end()) - return iter->second; - else - return NULL; - } }; #endif // LL_STAT_ diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 04cce7878e..a21d7aa6a1 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -45,7 +45,7 @@ LLStatBar::LLStatBar(const Params& p) mUnitLabel(p.unit_label), mMinBar(p.bar_min), mMaxBar(p.bar_max), - mStatp(LLStat::getStat(p.stat)), + mStatp(LLStat::getInstance(p.stat)), mTickSpacing(p.tick_spacing), mLabelSpacing(p.label_spacing), mPrecision(p.precision), diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 513fff3234..7e636d0aa7 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -59,10 +59,10 @@ public: label_spacing("label_spacing", 10.0f), precision("precision", 0), update_rate("update_rate", 5.0f), - show_per_sec("show_per_sec", TRUE), + show_per_sec("show_per_sec", true), show_bar("show_bar", TRUE), - show_history("show_history", FALSE), - show_mean("show_mean", TRUE), + show_history("show_history", false), + show_mean("show_mean", true), stat("stat") { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4c0657b61d..b3aa6949b3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -209,7 +209,6 @@ set(viewer_SOURCE_FILES llfloaterinspect.cpp llfloaterinventory.cpp llfloaterjoystick.cpp - llfloaterlagmeter.cpp llfloaterland.cpp llfloaterlandholdings.cpp llfloatermap.cpp @@ -784,7 +783,6 @@ set(viewer_HEADER_FILES llfloaterinspect.h llfloaterinventory.h llfloaterjoystick.h - llfloaterlagmeter.h llfloaterland.h llfloaterlandholdings.h llfloatermap.h diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp deleted file mode 100644 index 68b1770bb2..0000000000 --- a/indra/newview/llfloaterlagmeter.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/** - * @file llfloaterlagmeter.cpp - * @brief The "Lag-o-Meter" floater used to tell users what is causing lag. - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterlagmeter.h" - -#include "lluictrlfactory.h" -#include "llviewerstats.h" -#include "llviewertexture.h" -#include "llviewercontrol.h" -#include "llappviewer.h" - -#include "lltexturefetch.h" - -#include "llbutton.h" -#include "llfocusmgr.h" -#include "lltextbox.h" - -const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga"; -const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga"; -const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga"; - -LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) - : LLFloater(key) -{ - mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); -} - -BOOL LLFloaterLagMeter::postBuild() -{ - // Don't let this window take keyboard focus -- it's confusing to - // lose arrow-key driving when testing lag. - setIsChrome(TRUE); - - // were we shrunk last time? - if (isShrunk()) - { - onClickShrink(); - } - - mClientButton = getChild("client_lagmeter"); - mClientText = getChild("client_text"); - mClientCause = getChild("client_lag_cause"); - - mNetworkButton = getChild("network_lagmeter"); - mNetworkText = getChild("network_text"); - mNetworkCause = getChild("network_lag_cause"); - - mServerButton = getChild("server_lagmeter"); - mServerText = getChild("server_text"); - mServerCause = getChild("server_lag_cause"); - - std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs); - mClientFrameTimeCritical = 1.0f / (float)atof( config_string.c_str() ); - config_string = getString("client_frame_rate_warning_fps", mStringArgs); - mClientFrameTimeWarning = 1.0f / (float)atof( config_string.c_str() ); - - config_string = getString("network_packet_loss_critical_pct", mStringArgs); - mNetworkPacketLossCritical = (float)atof( config_string.c_str() ); - config_string = getString("network_packet_loss_warning_pct", mStringArgs); - mNetworkPacketLossWarning = (float)atof( config_string.c_str() ); - - config_string = getString("network_ping_critical_ms", mStringArgs); - mNetworkPingCritical = (float)atof( config_string.c_str() ); - config_string = getString("network_ping_warning_ms", mStringArgs); - mNetworkPingWarning = (float)atof( config_string.c_str() ); - config_string = getString("server_frame_rate_critical_fps", mStringArgs); - - mServerFrameTimeCritical = 1000.0f / (float)atof( config_string.c_str() ); - config_string = getString("server_frame_rate_warning_fps", mStringArgs); - mServerFrameTimeWarning = 1000.0f / (float)atof( config_string.c_str() ); - config_string = getString("server_single_process_max_time_ms", mStringArgs); - mServerSingleProcessMaxTime = (float)atof( config_string.c_str() ); - -// mShrunk = false; - config_string = getString("max_width_px", mStringArgs); - mMaxWidth = atoi( config_string.c_str() ); - config_string = getString("min_width_px", mStringArgs); - mMinWidth = atoi( config_string.c_str() ); - - mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps"); - mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps"); - - mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct"); - mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct"); - - mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms"); - mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms"); - - mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); - mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); - -// childSetAction("minimize", onClickShrink, this); - updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079) - - return TRUE; -} -LLFloaterLagMeter::~LLFloaterLagMeter() -{ - // save shrunk status for next time -// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); - // expand so we save the large window rectangle - if (isShrunk()) - { - onClickShrink(); - } -} - -void LLFloaterLagMeter::draw() -{ - determineClient(); - determineNetwork(); - determineServer(); - - LLFloater::draw(); -} - -void LLFloaterLagMeter::determineClient() -{ - F32 client_frame_time = LLViewerStats::getInstance()->mFPSStat.getMeanDuration(); - bool find_cause = false; - - if (!gFocusMgr.getAppHasFocus()) - { - mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); - mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) ); - mClientCause->setText( LLStringUtil::null ); - } - else if(client_frame_time >= mClientFrameTimeCritical) - { - mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); - mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) ); - find_cause = true; - } - else if(client_frame_time >= mClientFrameTimeWarning) - { - mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); - mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) ); - find_cause = true; - } - else - { - mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); - mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) ); - mClientCause->setText( LLStringUtil::null ); - } - - if(find_cause) - { - if(gSavedSettings.getF32("RenderFarClip") > 128) - { - mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) ); - } - else if(LLAppViewer::instance()->getTextureFetch()->getNumRequests() > 2) - { - mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) ); - } - else if((BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes)) > LLViewerTexture::sMaxBoundTextureMemInMegaBytes) - { - mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) ); - } - else - { - mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) ); - } - } -} - -void LLFloaterLagMeter::determineNetwork() -{ - F32 packet_loss = LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean(); - F32 ping_time = LLViewerStats::getInstance()->mSimPingStat.getMean(); - bool find_cause_loss = false; - bool find_cause_ping = false; - - // *FIXME: We can't blame a large ping time on anything in - // particular if the frame rate is low, because a low frame - // rate is a sure recipe for bad ping times right now until - // the network handlers are de-synched from the rendering. - F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration(); - - if(packet_loss >= mNetworkPacketLossCritical) - { - mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); - mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) ); - find_cause_loss = true; - } - else if(ping_time >= mNetworkPingCritical) - { - mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); - if (client_frame_time_ms < mNetworkPingCritical) - { - mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) ); - find_cause_ping = true; - } - } - else if(packet_loss >= mNetworkPacketLossWarning) - { - mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); - mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) ); - find_cause_loss = true; - } - else if(ping_time >= mNetworkPingWarning) - { - mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); - if (client_frame_time_ms < mNetworkPingWarning) - { - mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) ); - find_cause_ping = true; - } - } - else - { - mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); - mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) ); - } - - if(find_cause_loss) - { - mNetworkCause->setText( getString("network_packet_loss_cause_msg", mStringArgs) ); - } - else if(find_cause_ping) - { - mNetworkCause->setText( getString("network_ping_cause_msg", mStringArgs) ); - } - else - { - mNetworkCause->setText( LLStringUtil::null ); - } -} - -void LLFloaterLagMeter::determineServer() -{ - F32 sim_frame_time = LLViewerStats::getInstance()->mSimFrameMsec.getCurrent(); - bool find_cause = false; - - if(sim_frame_time >= mServerFrameTimeCritical) - { - mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); - mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) ); - find_cause = true; - } - else if(sim_frame_time >= mServerFrameTimeWarning) - { - mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); - mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) ); - find_cause = true; - } - else - { - mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); - mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) ); - mServerCause->setText( LLStringUtil::null ); - } - - if(find_cause) - { - if(LLViewerStats::getInstance()->mSimSimPhysicsMsec.getCurrent() > mServerSingleProcessMaxTime) - { - mServerCause->setText( getString("server_physics_cause_msg", mStringArgs) ); - } - else if(LLViewerStats::getInstance()->mSimScriptMsec.getCurrent() > mServerSingleProcessMaxTime) - { - mServerCause->setText( getString("server_scripts_cause_msg", mStringArgs) ); - } - else if(LLViewerStats::getInstance()->mSimNetMsec.getCurrent() > mServerSingleProcessMaxTime) - { - mServerCause->setText( getString("server_net_cause_msg", mStringArgs) ); - } - else if(LLViewerStats::getInstance()->mSimAgentMsec.getCurrent() > mServerSingleProcessMaxTime) - { - mServerCause->setText( getString("server_agent_cause_msg", mStringArgs) ); - } - else if(LLViewerStats::getInstance()->mSimImagesMsec.getCurrent() > mServerSingleProcessMaxTime) - { - mServerCause->setText( getString("server_images_cause_msg", mStringArgs) ); - } - else - { - mServerCause->setText( getString("server_generic_cause_msg", mStringArgs) ); - } - } -} - -void LLFloaterLagMeter::updateControls(bool shrink) -{ -// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data; - - LLButton * button = getChild("minimize"); - S32 delta_width = mMaxWidth -mMinWidth; - LLRect r = getRect(); - - if(!shrink) - { - setTitle(getString("max_title_msg", mStringArgs) ); - // make left edge appear to expand - r.translate(-delta_width, 0); - setRect(r); - reshape(mMaxWidth, getRect().getHeight()); - - getChild("client")->setValue(getString("client_text_msg", mStringArgs) + ":"); - getChild("network")->setValue(getString("network_text_msg",mStringArgs) + ":"); - getChild("server")->setValue(getString("server_text_msg", mStringArgs) + ":"); - - // usually "<<" - button->setLabel( getString("smaller_label", mStringArgs) ); - } - else - { - setTitle( getString("min_title_msg", mStringArgs) ); - // make left edge appear to collapse - r.translate(delta_width, 0); - setRect(r); - reshape(mMinWidth, getRect().getHeight()); - - getChild("client")->setValue(getString("client_text_msg", mStringArgs) ); - getChild("network")->setValue(getString("network_text_msg",mStringArgs) ); - getChild("server")->setValue(getString("server_text_msg", mStringArgs) ); - - // usually ">>" - button->setLabel( getString("bigger_label", mStringArgs) ); - } - // Don't put keyboard focus on the button - button->setFocus(FALSE); - -// self->mClientText->setVisible(self->mShrunk); -// self->mClientCause->setVisible(self->mShrunk); -// self->getChildView("client_help")->setVisible( self->mShrunk); - -// self->mNetworkText->setVisible(self->mShrunk); -// self->mNetworkCause->setVisible(self->mShrunk); -// self->getChildView("network_help")->setVisible( self->mShrunk); - -// self->mServerText->setVisible(self->mShrunk); -// self->mServerCause->setVisible(self->mShrunk); -// self->getChildView("server_help")->setVisible( self->mShrunk); - -// self->mShrunk = !self->mShrunk; -} - -BOOL LLFloaterLagMeter::isShrunk() -{ - return gSavedSettings.getBOOL("LagMeterShrunk"); -} - -void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk" -{ - bool shrunk = isShrunk(); - updateControls(!shrunk); - gSavedSettings.setBOOL("LagMeterShrunk", !shrunk); -} diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h deleted file mode 100644 index eef6955601..0000000000 --- a/indra/newview/llfloaterlagmeter.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file llfloaterlagmeter.h - * @brief The "Lag-o-Meter" floater used to tell users what is causing lag. - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LLFLOATERLAGMETER_H -#define LLFLOATERLAGMETER_H - -#include "llfloater.h" - -class LLTextBox; - -class LLFloaterLagMeter : public LLFloater -{ - friend class LLFloaterReg; - -public: - /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); -private: - - LLFloaterLagMeter(const LLSD& key); - /*virtual*/ ~LLFloaterLagMeter(); - void determineClient(); - void determineNetwork(); - void determineServer(); - void updateControls(bool shrink); - BOOL isShrunk(); - - void onClickShrink(); - - bool mShrunk; - S32 mMaxWidth, mMinWidth; - - F32 mClientFrameTimeCritical; - F32 mClientFrameTimeWarning; - LLButton * mClientButton; - LLTextBox * mClientText; - LLTextBox * mClientCause; - - F32 mNetworkPacketLossCritical; - F32 mNetworkPacketLossWarning; - F32 mNetworkPingCritical; - F32 mNetworkPingWarning; - LLButton * mNetworkButton; - LLTextBox * mNetworkText; - LLTextBox * mNetworkCause; - - F32 mServerFrameTimeCritical; - F32 mServerFrameTimeWarning; - F32 mServerSingleProcessMaxTime; - LLButton * mServerButton; - LLTextBox * mServerText; - LLTextBox * mServerCause; - - LLStringUtil::format_map_t mStringArgs; -}; - -#endif diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 89240c982f..fc6e9fd514 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -37,7 +37,6 @@ #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" #include "llbuycurrencyhtml.h" -#include "llfloaterlagmeter.h" #include "llpanelnearbymedia.h" #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 4c59fd0371..e556743cbf 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -369,8 +369,8 @@ LLViewerAssetStats::asLLSD(bool compact_output) std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat); avatar_info[avatar_nearby_tag][rez_status_name] = mAvatarRezStates[rez_stat]; } - avatar_info[avatar_phase_stats_tag]["cloud"] = mPhaseStats["cloud"].getData(); - avatar_info[avatar_phase_stats_tag]["cloud-or-gray"] = mPhaseStats["cloud-or-gray"].getData(); + avatar_info[avatar_phase_stats_tag]["cloud"] = mPhaseStats["cloud"].asLLSD(); + avatar_info[avatar_phase_stats_tag]["cloud-or-gray"] = mPhaseStats["cloud-or-gray"].asLLSD(); ret[avatar_tag] = avatar_info; return ret; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 1f7cf0cdd4..69586e3634 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -73,7 +73,6 @@ #include "llfloaterinspect.h" #include "llfloaterinventory.h" #include "llfloaterjoystick.h" -#include "llfloaterlagmeter.h" #include "llfloaterland.h" #include "llfloaterlandholdings.h" #include "llfloatermap.h" @@ -227,7 +226,6 @@ void LLViewerFloaterReg::registerFloaters() LLNotificationsUI::registerFloater(); LLFloaterDisplayNameUtil::registerFloater(); - LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 1d6d5b7e72..58a7b3a463 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -66,137 +66,134 @@ class StatAttributes { public: StatAttributes(const char* name, - const BOOL enabled, - const BOOL is_timer) + const BOOL enabled) : mName(name), - mEnabled(enabled), - mIsTimer(is_timer) + mEnabled(enabled) { } std::string mName; BOOL mEnabled; - BOOL mIsTimer; }; const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = { // ST_VERSION - StatAttributes("Version", TRUE, FALSE), + StatAttributes("Version", TRUE), // ST_AVATAR_EDIT_SECONDS - StatAttributes("Seconds in Edit Appearence", FALSE, TRUE), + StatAttributes("Seconds in Edit Appearence", FALSE), // ST_TOOLBOX_SECONDS - StatAttributes("Seconds using Toolbox", FALSE, TRUE), + StatAttributes("Seconds using Toolbox", FALSE), // ST_CHAT_COUNT - StatAttributes("Chat messages sent", FALSE, FALSE), + StatAttributes("Chat messages sent", FALSE), // ST_IM_COUNT - StatAttributes("IMs sent", FALSE, FALSE), + StatAttributes("IMs sent", FALSE), // ST_FULLSCREEN_BOOL - StatAttributes("Fullscreen mode", FALSE, FALSE), + StatAttributes("Fullscreen mode", FALSE), // ST_RELEASE_COUNT - StatAttributes("Object release count", FALSE, FALSE), + StatAttributes("Object release count", FALSE), // ST_CREATE_COUNT - StatAttributes("Object create count", FALSE, FALSE), + StatAttributes("Object create count", FALSE), // ST_REZ_COUNT - StatAttributes("Object rez count", FALSE, FALSE), + StatAttributes("Object rez count", FALSE), // ST_FPS_10_SECONDS - StatAttributes("Seconds below 10 FPS", FALSE, TRUE), + StatAttributes("Seconds below 10 FPS", FALSE), // ST_FPS_2_SECONDS - StatAttributes("Seconds below 2 FPS", FALSE, TRUE), + StatAttributes("Seconds below 2 FPS", FALSE), // ST_MOUSELOOK_SECONDS - StatAttributes("Seconds in Mouselook", FALSE, TRUE), + StatAttributes("Seconds in Mouselook", FALSE), // ST_FLY_COUNT - StatAttributes("Fly count", FALSE, FALSE), + StatAttributes("Fly count", FALSE), // ST_TELEPORT_COUNT - StatAttributes("Teleport count", FALSE, FALSE), + StatAttributes("Teleport count", FALSE), // ST_OBJECT_DELETE_COUNT - StatAttributes("Objects deleted", FALSE, FALSE), + StatAttributes("Objects deleted", FALSE), // ST_SNAPSHOT_COUNT - StatAttributes("Snapshots taken", FALSE, FALSE), + StatAttributes("Snapshots taken", FALSE), // ST_UPLOAD_SOUND_COUNT - StatAttributes("Sounds uploaded", FALSE, FALSE), + StatAttributes("Sounds uploaded", FALSE), // ST_UPLOAD_TEXTURE_COUNT - StatAttributes("Textures uploaded", FALSE, FALSE), + StatAttributes("Textures uploaded", FALSE), // ST_EDIT_TEXTURE_COUNT - StatAttributes("Changes to textures on objects", FALSE, FALSE), + StatAttributes("Changes to textures on objects", FALSE), // ST_KILLED_COUNT - StatAttributes("Number of times killed", FALSE, FALSE), + StatAttributes("Number of times killed", FALSE), // ST_FRAMETIME_JITTER - StatAttributes("Average delta between sucessive frame times", FALSE, FALSE), + StatAttributes("Average delta between successive frame times", FALSE), // ST_FRAMETIME_SLEW - StatAttributes("Average delta between frame time and mean", FALSE, FALSE), + StatAttributes("Average delta between frame time and mean", FALSE), // ST_INVENTORY_TOO_LONG - StatAttributes("Inventory took too long to load", FALSE, FALSE), + StatAttributes("Inventory took too long to load", FALSE), // ST_WEARABLES_TOO_LONG - StatAttributes("Wearables took too long to load", FALSE, FALSE), + StatAttributes("Wearables took too long to load", FALSE), // ST_LOGIN_SECONDS - StatAttributes("Time between LoginRequest and LoginReply", FALSE, FALSE), + StatAttributes("Time between LoginRequest and LoginReply", FALSE), // ST_LOGIN_TIMEOUT_COUNT - StatAttributes("Number of login attempts that timed out", FALSE, FALSE), + StatAttributes("Number of login attempts that timed out", FALSE), // ST_HAS_BAD_TIMER - StatAttributes("Known bad timer if != 0.0", FALSE, FALSE), + StatAttributes("Known bad timer if != 0.0", FALSE), // ST_DOWNLOAD_FAILED - StatAttributes("Number of times LLAssetStorage::getAssetData() has failed", FALSE, FALSE), + StatAttributes("Number of times LLAssetStorage::getAssetData() has failed", FALSE), // ST_LSL_SAVE_COUNT - StatAttributes("Number of times user has saved a script", FALSE, FALSE), + StatAttributes("Number of times user has saved a script", FALSE), // ST_UPLOAD_ANIM_COUNT - StatAttributes("Animations uploaded", FALSE, FALSE), + StatAttributes("Animations uploaded", FALSE), // ST_FPS_8_SECONDS - StatAttributes("Seconds below 8 FPS", FALSE, TRUE), + StatAttributes("Seconds below 8 FPS", FALSE), // ST_SIM_FPS_20_SECONDS - StatAttributes("Seconds with sim FPS below 20", FALSE, TRUE), + StatAttributes("Seconds with sim FPS below 20", FALSE), // ST_PHYS_FPS_20_SECONDS - StatAttributes("Seconds with physics FPS below 20", FALSE, TRUE), + StatAttributes("Seconds with physics FPS below 20", FALSE), // ST_LOSS_05_SECONDS - StatAttributes("Seconds with packet loss > 5%", FALSE, TRUE), + StatAttributes("Seconds with packet loss > 5%", FALSE), // ST_FPS_DROP_50_RATIO - StatAttributes("Ratio of frames 2x longer than previous", FALSE, FALSE), + StatAttributes("Ratio of frames 2x longer than previous", FALSE), // ST_ENABLE_VBO - StatAttributes("Vertex Buffers Enabled", TRUE, FALSE), + StatAttributes("Vertex Buffers Enabled", TRUE), // ST_DELTA_BANDWIDTH - StatAttributes("Increase/Decrease in bandwidth based on packet loss", FALSE, FALSE), + StatAttributes("Increase/Decrease in bandwidth based on packet loss", FALSE), // ST_MAX_BANDWIDTH - StatAttributes("Max bandwidth setting", FALSE, FALSE), + StatAttributes("Max bandwidth setting", FALSE), // ST_LIGHTING_DETAIL - StatAttributes("Lighting Detail", FALSE, FALSE), + StatAttributes("Lighting Detail", FALSE), // ST_VISIBLE_AVATARS - StatAttributes("Visible Avatars", FALSE, FALSE), + StatAttributes("Visible Avatars", FALSE), // ST_SHADER_OJECTS - StatAttributes("Object Shaders", FALSE, FALSE), + StatAttributes("Object Shaders", FALSE), // ST_SHADER_ENVIRONMENT - StatAttributes("Environment Shaders", FALSE, FALSE), + StatAttributes("Environment Shaders", FALSE), // ST_VISIBLE_DRAW_DIST - StatAttributes("Draw Distance", FALSE, FALSE), + StatAttributes("Draw Distance", FALSE), // ST_VISIBLE_CHAT_BUBBLES - StatAttributes("Chat Bubbles Enabled", FALSE, FALSE), + StatAttributes("Chat Bubbles Enabled", FALSE), // ST_SHADER_AVATAR - StatAttributes("Avatar Shaders", FALSE, FALSE), + StatAttributes("Avatar Shaders", FALSE), // ST_FRAME_SECS - StatAttributes("FRAME_SECS", FALSE, FALSE), + StatAttributes("FRAME_SECS", FALSE), // ST_UPDATE_SECS - StatAttributes("UPDATE_SECS", FALSE, FALSE), + StatAttributes("UPDATE_SECS", FALSE), // ST_NETWORK_SECS - StatAttributes("NETWORK_SECS", FALSE, FALSE), + StatAttributes("NETWORK_SECS", FALSE), // ST_IMAGE_SECS - StatAttributes("IMAGE_SECS", FALSE, FALSE), + StatAttributes("IMAGE_SECS", FALSE), // ST_REBUILD_SECS - StatAttributes("REBUILD_SECS", FALSE, FALSE), + StatAttributes("REBUILD_SECS", FALSE), // ST_RENDER_SECS - StatAttributes("RENDER_SECS", FALSE, FALSE), + StatAttributes("RENDER_SECS", FALSE), // ST_CROSSING_AVG - StatAttributes("CROSSING_AVG", FALSE, FALSE), + StatAttributes("CROSSING_AVG", FALSE), // ST_CROSSING_MAX - StatAttributes("CROSSING_MAX", FALSE, FALSE), + StatAttributes("CROSSING_MAX", FALSE), // ST_LIBXUL_WIDGET_USED - StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused + StatAttributes("LibXUL Widget used", FALSE), // Unused // ST_WINDOW_WIDTH - StatAttributes("Window width", FALSE, FALSE), + StatAttributes("Window width", FALSE), // ST_WINDOW_HEIGHT - StatAttributes("Window height", FALSE, FALSE), + StatAttributes("Window height", FALSE), // ST_TEX_BAKES - StatAttributes("Texture Bakes", FALSE, FALSE), + StatAttributes("Texture Bakes", FALSE), // ST_TEX_REBAKES - StatAttributes("Texture Rebakes", FALSE, FALSE) + StatAttributes("Texture Rebakes", FALSE) }; @@ -207,16 +204,11 @@ LLViewerStats::LLViewerStats() : mAssetKBitStat("assetkbitstat"), mTextureKBitStat("texturekbitstat"), mVFSPendingOperations("vfspendingoperations"), - mObjectsDrawnStat("objectsdrawnstat"), - mObjectsCulledStat("objectsculledstat"), - mObjectsTestedStat("objectstestedstat"), - mObjectsComparedStat("objectscomparedstat"), - mObjectsOccludedStat("objectsoccludedstat"), mFPSStat("fpsstat"), mPacketsInStat("packetsinstat"), mPacketsLostStat("packetsloststat"), mPacketsOutStat("packetsoutstat"), - mPacketsLostPercentStat("packetslostpercentstat", 64), + mPacketsLostPercentStat("packetslostpercentstat"), mTexturePacketsStat("texturepacketsstat"), mActualInKBitStat("actualinkbitstat"), mActualOutKBitStat("actualoutkbitstat"), @@ -258,12 +250,12 @@ LLViewerStats::LLViewerStats() : mPhysicsLODTasks("physicslodtasks"), mPhysicsMemoryAllocated("physicsmemoryallocated"), mSimPingStat("simpingstat"), - mNumImagesStat("numimagesstat", 32, TRUE), - mNumRawImagesStat("numrawimagesstat", 32, TRUE), - mGLTexMemStat("gltexmemstat", 32, TRUE), - mGLBoundMemStat("glboundmemstat", 32, TRUE), - mRawMemStat("rawmemstat", 32, TRUE), - mFormattedMemStat("formattedmemstat", 32, TRUE), + mNumImagesStat("numimagesstat", TRUE), + mNumRawImagesStat("numrawimagesstat", TRUE), + mGLTexMemStat("gltexmemstat", TRUE), + mGLBoundMemStat("glboundmemstat", TRUE), + mRawMemStat("rawmemstat", TRUE), + mFormattedMemStat("formattedmemstat", TRUE), mNumObjectsStat("numobjectsstat"), mNumActiveObjectsStat("numactiveobjectsstat"), mNumNewObjectsStat("numnewobjectsstat"), @@ -284,10 +276,6 @@ LLViewerStats::LLViewerStats() : mAgentPositionSnaps.reset(); } -LLViewerStats::~LLViewerStats() -{ -} - void LLViewerStats::resetStats() { LLViewerStats& stats = LLViewerStats::instance(); @@ -398,7 +386,7 @@ void LLViewerStats::addToMessage(LLSD &body) const } } - body["AgentPositionSnaps"] = mAgentPositionSnaps.getData(); + body["AgentPositionSnaps"] = mAgentPositionSnaps.asLLSD(); llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev() << "; Count = " << mAgentPositionSnaps.getCount() << llendl; } @@ -783,7 +771,7 @@ void LLViewerStats::PhaseMap::clearPhases() mPhaseMap.clear(); } -LLSD LLViewerStats::PhaseMap::dumpPhases() +LLSD LLViewerStats::PhaseMap::asLLSD() { LLSD result; for (phase_map_t::iterator iter = mPhaseMap.begin(); iter != mPhaseMap.end(); ++iter) diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index e02a4ccdc7..0d8f2a45c0 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -39,11 +39,6 @@ public: mAssetKBitStat, mTextureKBitStat, mVFSPendingOperations, - mObjectsDrawnStat, - mObjectsCulledStat, - mObjectsTestedStat, - mObjectsComparedStat, - mObjectsOccludedStat, mFPSStat, mPacketsInStat, mPacketsLostStat, @@ -55,60 +50,60 @@ public: mTrianglesDrawnStat; // Simulator stats - LLStat mSimTimeDilation, + LLStat mSimTimeDilation; - mSimFPS, + LLStat mSimFPS, mSimPhysicsFPS, mSimAgentUPS, - mSimScriptEPS, + mSimScriptEPS; - mSimFrameMsec, + LLStat mSimFrameMsec, mSimNetMsec, mSimSimOtherMsec, - mSimSimPhysicsMsec, + mSimSimPhysicsMsec; - mSimSimPhysicsStepMsec, + LLStat mSimSimPhysicsStepMsec, mSimSimPhysicsShapeUpdateMsec, mSimSimPhysicsOtherMsec, mSimSimAIStepMsec, mSimSimSkippedSilhouetteSteps, - mSimSimPctSteppedCharacters, + mSimSimPctSteppedCharacters; - mSimAgentMsec, + LLStat mSimAgentMsec, mSimImagesMsec, mSimScriptMsec, mSimSpareMsec, mSimSleepMsec, - mSimPumpIOMsec, + mSimPumpIOMsec; - mSimMainAgents, + LLStat mSimMainAgents, mSimChildAgents, mSimObjects, mSimActiveObjects, mSimActiveScripts, - mSimPctScriptsRun, + mSimPctScriptsRun; - mSimInPPS, + LLStat mSimInPPS, mSimOutPPS, mSimPendingDownloads, mSimPendingUploads, mSimPendingLocalUploads, - mSimTotalUnackedBytes, + mSimTotalUnackedBytes; - mPhysicsPinnedTasks, + LLStat mPhysicsPinnedTasks, mPhysicsLODTasks, - mPhysicsMemoryAllocated, + mPhysicsMemoryAllocated; - mSimPingStat, + LLStat mSimPingStat; - mNumImagesStat, + LLStat mNumImagesStat, mNumRawImagesStat, mGLTexMemStat, mGLBoundMemStat, mRawMemStat, - mFormattedMemStat, + mFormattedMemStat; - mNumObjectsStat, + LLStat mNumObjectsStat, mNumActiveObjectsStat, mNumNewObjectsStat, mNumSizeCulledStat, @@ -182,7 +177,6 @@ public: }; LLViewerStats(); - ~LLViewerStats(); // all return latest value of given stat F64 getStat(EStatType type) const; @@ -203,7 +197,7 @@ public: U32 mCountOfNextUpdatesToIgnore; inline StatsAccumulator() - { + { reset(); } @@ -263,7 +257,7 @@ public: mCountOfNextUpdatesToIgnore = 0; } - inline LLSD getData() const + inline LLSD asLLSD() const { LLSD data; data["mean"] = getMean(); @@ -293,7 +287,7 @@ public: void stopPhase(const std::string& phase_name); void stopAllPhases(); void clearPhases(); - LLSD dumpPhases(); + LLSD asLLSD(); static StatsAccumulator& getPhaseStats(const std::string& phase_name); static void recordPhaseStat(const std::string& phase_name, F32 value); }; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 80cca9963e..c0b196918d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -67,12 +67,12 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; U32 LLViewerTextureList::sTextureBits = 0; U32 LLViewerTextureList::sTexturePackets = 0; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE); -LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE); -LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE); -LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE); +LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE); +LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE); +LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", TRUE); +LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", TRUE); +LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", TRUE); +LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6ef9bdd238..93573ed52e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2140,8 +2140,8 @@ LLSD LLVOAvatarSelf::metricsData() result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32(); result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); - result["phases"] = getPhases().dumpPhases(); - result["startup"] = LLStartUp::getPhases().dumpPhases(); + result["phases"] = getPhases().asLLSD(); + result["startup"] = LLStartUp::getPhases().asLLSD(); return result; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 09d17b3701..43152c9025 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1157,7 +1157,7 @@ void send_agent_resume() } // Reset the FPS counter to avoid an invalid fps - LLViewerStats::getInstance()->mFPSStat.start(); + LLViewerStats::getInstance()->mFPSStat.reset(); LLAppViewer::instance()->resumeMainloopTimeout(); } diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml deleted file mode 100644 index 149d174c34..0000000000 --- a/indra/newview/skins/default/xui/da/floater_lagmeter.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - Lag måler - - - 360 - - - Lag - - - 90 - - - Klient - - - 10 - - - 15 - - - Normal, vindue i baggrund - - - Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL] - - - Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING] - - - Normal - - - Mulig årsag: 'Vis afstand' sat for højt i grafik indstillinger - - - Mulig årsag: Billeder hentes - - - Mulig årsag: For mange billeder i hukommelse - - - Mulig årsag: For mange komplekse objekter i scenariet - - - Netværk - - - 10 - - - 5 - - - Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker - - - Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker - - - Normal - - - 600 - - - 300 - - - Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms - - - Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms - - - Muligvis dårlig forbindelse eller 'båndbredde' sat for højt i netværksopsætning. - - - Muligvis dårlig forbindelse eller fil delings program. - - - Server - - - 20 - - - 30 - - - 20 - - - Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL] - - - Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING] - - - Normal - - - Mulig årsag: For mange fysiske objekter - - - Mulig årsag: For mange objekter med script - - - Mulig årsag: For meget netværks trafik - - - Mulig årsag: For mange avatarer i bevægelse i regionen - - - Mulig årsag: For mange billed udregninger - - - Mulig årsag: Simulator belastning for stor - - - >> - - - << - - - diff --git a/indra/newview/skins/default/xui/es/floater_lagmeter.xml b/indra/newview/skins/default/xui/es/floater_lagmeter.xml deleted file mode 100644 index 227689a194..0000000000 --- a/indra/newview/skins/default/xui/es/floater_lagmeter.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - Medidor del lag - - - 360 - - - Lag - - - 90 - - - Cliente - - - 10 - - - 15 - - - Normal, ventana en segundo plano - - - Frames del cliente valorados por debajo de [CLIENT_FRAME_RATE_CRITICAL] - - - Frames del cliente valorados entre [CLIENT_FRAME_RATE_CRITICAL] y [CLIENT_FRAME_RATE_WARNING] - - - Normal - - - Posible causa: distancia de dibujo fijada muy alta - - - Posible causa: imágenes cargándose - - - Posible causa: demasiadas imágenes en la memoria - - - Posible causa: demasiados objetos complejos en la escena - - - Red - - - 10 - - - 5 - - - La conexión deja caer más del [NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes - - - La conexión deja caer [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes - - - Normal - - - 600 - - - 300 - - - El tiempo de conexión -ping- supera los [NETWORK_PING_CRITICAL] ms - - - El tiempo de conexión -ping- es de [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms - - - Quizá una mala conexión o un ancho de banda fijado demasiado alto. - - - Quizá una mala conexión o una aplicación de archivos compartidos. - - - Servidor - - - 20 - - - 30 - - - 20 - - - Frecuencia (framerate) por debajo de [SERVER_FRAME_RATE_CRITICAL] - - - Frecuencia (framerate) entre [SERVER_FRAME_RATE_CRITICAL] y [SERVER_FRAME_RATE_WARNING] - - - Normal - - - Posible causa: demasiados objetos físicos - - - Posible causa: demasiados objetos con script - - - Posible causa: demasiado tráfico en la red - - - Posible causa: demasiada gente moviéndose en la región - - - Posible causa: demasiados cálculos de imáganes - - - Posible causa: carga del simulador muy pesada - - - >> - - - << - -