From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/newview/llappviewer.cpp | 6 - indra/newview/lldebugview.cpp | 1 - indra/newview/lldebugview.h | 2 - indra/newview/llfloaterjoystick.cpp | 4 +- indra/newview/llfloaterreporter.cpp | 2 +- indra/newview/lltexturectrl.h | 4 - indra/newview/lltexturefetch.cpp | 14 +- indra/newview/lltexturefetch.h | 4 +- indra/newview/llviewermenu.cpp | 14 - indra/newview/llviewerobjectlist.cpp | 11 +- indra/newview/llviewerobjectlist.h | 4 +- indra/newview/llviewerstats.cpp | 122 +- indra/newview/llviewerstats.h | 16 +- indra/newview/llviewerthrottle.cpp | 6 +- indra/newview/llworld.cpp | 15 +- indra/newview/pipeline.cpp | 2 +- .../newview/skins/default/xui/en/floater_stats.xml | 1211 ++++++-------------- 17 files changed, 466 insertions(+), 972 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e77f793a43..5f6b183fcc 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2070,8 +2070,6 @@ bool LLAppViewer::cleanup() ll_close_fail_log(); - MEM_TRACK_RELEASE - llinfos << "Goodbye!" << llendflush; // return 0; @@ -2099,11 +2097,7 @@ void watchdog_killer_callback() bool LLAppViewer::initThreads() { -#if MEM_TRACK_MEM - static const bool enable_threads = false; -#else static const bool enable_threads = true; -#endif LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 1264f05d77..63dd59b020 100755 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -55,7 +55,6 @@ static LLDefaultChildRegistry::Register r("debug_view"); LLDebugView::LLDebugView(const LLDebugView::Params& p) : LLView(p), mFastTimerView(NULL), - mMemoryView(NULL), mDebugConsolep(NULL), mFloaterSnapRegion(NULL) {} diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h index 5aec77ad62..a6490c876c 100755 --- a/indra/newview/lldebugview.h +++ b/indra/newview/lldebugview.h @@ -36,7 +36,6 @@ class LLButton; class LLStatusPanel; class LLFastTimerView; -class LLMemoryView; class LLConsole; class LLTextureView; class LLFloaterStats; @@ -61,7 +60,6 @@ public: void setStatsVisible(BOOL visible); LLFastTimerView* mFastTimerView; - LLMemoryView* mMemoryView; LLConsole* mDebugConsolep; LLView* mFloaterSnapRegion; }; diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index b71ab4c53b..adcecbbb7a 100755 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -85,7 +85,7 @@ void LLFloaterJoystick::draw() if (llabs(value) > maxbar) { F32 range = llabs(value); - mAxisStatsBar[i]->setRange(-range, range, range * 0.25f); + mAxisStatsBar[i]->setRange(-range, range); } } } @@ -106,7 +106,7 @@ BOOL LLFloaterJoystick::postBuild() if (mAxisStatsBar[i]) { mAxisStatsBar[i]->setStat(stat_name); - mAxisStatsBar[i]->setRange(-range, range, range * 0.25f); + mAxisStatsBar[i]->setRange(-range, range); } } diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 35b63c5480..b42118a0c1 100755 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -784,7 +784,7 @@ void LLFloaterReporter::takeScreenshot() image_in_list->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER); // the texture picker then uses that texture - LLTexturePicker* texture = getChild("screenshot"); + LLTextureCtrl* texture = getChild("screenshot"); if (texture) { texture->setImageAssetID(mResourceDatap->mAssetInfo.mUuid); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index ad79042ef1..15ca7bed92 100755 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -227,8 +227,4 @@ private: S32 mLabelWidth; }; -// XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp -// and class to LLTexturePicker -#define LLTexturePicker LLTextureCtrl - #endif // LL_LLTEXTURECTRL_H diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0390649a1c..6716391f41 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -64,9 +64,9 @@ #include "bufferarray.h" #include "bufferstream.h" -bool LLTextureFetchDebugger::sDebuggerEnabled = false ; -LLTrace::SampleStatHandle<> LLTextureFetch::sCacheHitRate("texture_cache_hits"); -LLTrace::SampleStatHandle<> LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); +bool LLTextureFetchDebugger::sDebuggerEnabled = false; +LLTrace::EventStatHandle > LLTextureFetch::sCacheHitRate("texture_cache_hits"); +LLTrace::EventStatHandle > LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); ////////////////////////////////////////////////////////////////////////////// @@ -1251,7 +1251,7 @@ bool LLTextureFetchWorker::doWork(S32 param) LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; - sample(LLTextureFetch::sCacheHitRate, 100.f); + record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(1)); } else { @@ -1269,7 +1269,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } // fall through - sample(LLTextureFetch::sCacheHitRate, 0.f); + record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(0)); } } @@ -2762,10 +2762,10 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, discard_level = worker->mDecodedDiscard; raw = worker->mRawImage; aux = worker->mAuxImage; - F32 cache_read_time = worker->mCacheReadTime; + LLUnit cache_read_time = worker->mCacheReadTime; if (cache_read_time != 0.f) { - sample(sCacheReadLatency, cache_read_time * 1000.f); + record(sCacheReadLatency, cache_read_time); } res = true; LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 7fc58e230c..109f2bd401 100755 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -309,8 +309,8 @@ private: LLMutex mQueueMutex; //to protect mRequestMap and mCommands only LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue. - static LLTrace::SampleStatHandle<> sCacheHitRate; - static LLTrace::SampleStatHandle<> sCacheReadLatency; + static LLTrace::EventStatHandle > sCacheHitRate; + static LLTrace::EventStatHandle > sCacheReadLatency; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fb199ba879..9f67aad297 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -475,14 +475,12 @@ void init_menus() gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); -#if !MEM_TRACK_MEM // Don't display the Memory console menu if the feature is turned off LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", TRUE); if (memoryMenu) { memoryMenu->setVisible(FALSE); } -#endif gMenuBarView->createJumpKeys(); @@ -528,12 +526,6 @@ class LLAdvancedToggleConsole : public view_listener_t toggle_visibility( (void*)gSceneView); } -#if MEM_TRACK_MEM - else if ("memory view" == console_type) - { - toggle_visibility( (void*)gDebugView->mMemoryView ); - } -#endif return true; } }; @@ -559,12 +551,6 @@ class LLAdvancedCheckConsole : public view_listener_t { new_value = get_visibility( (void*) gSceneView); } -#if MEM_TRACK_MEM - else if ("memory view" == console_type) - { - new_value = get_visibility( (void*)gDebugView->mMemoryView ); - } -#endif return new_value; } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index b215869a3e..8299c84663 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -95,12 +95,10 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::SampleStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); +LLTrace::SampleStatHandle > LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { - mNumVisCulled = 0; - mNumSizeCulled = 0; mCurLazyUpdateIndex = 0; mCurBin = 0; mNumDeadObjects = 0; @@ -358,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sample(sCacheHitRate, 100.f); + sample(sCacheHitRate, LLUnits::Percent::fromValue(100.f)); } if (objectp->isDead()) @@ -1091,9 +1089,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) fetchObjectCosts(); fetchPhysicsFlags(); - mNumSizeCulled = 0; - mNumVisCulled = 0; - // update max computed render cost LLVOVolume::updateRenderComplexity(); @@ -1155,8 +1150,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) sample(LLStatViewer::NUM_OBJECTS, mObjects.size()); sample(LLStatViewer::NUM_ACTIVE_OBJECTS, idle_count); - sample(LLStatViewer::NUM_SIZE_CULLED, mNumSizeCulled); - sample(LLStatViewer::NUM_VIS_CULLED, mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 464554245e..741c7c7db9 100755 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -170,8 +170,6 @@ public: // Statistics data (see also LLViewerStats) S32 mNumNewObjects; - S32 mNumSizeCulled; - S32 mNumVisCulled; // if we paused in the last frame // used to discount stats from this frame @@ -198,7 +196,7 @@ protected: std::vector mOrphanChildren; // UUID's of orphaned objects S32 mNumOrphans; - static LLTrace::SampleStatHandle<> sCacheHitRate; + static LLTrace::SampleStatHandle > sCacheHitRate; typedef std::vector > vobj_list_t; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 244c150b29..d753619daa 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -64,15 +64,14 @@ namespace LLStatViewer { -LLTrace::CountStatHandle<> FPS("framesrendered"), - PACKETS_IN("packetsinstat"), - PACKETS_LOST("packetsloststat"), - PACKETS_OUT("packetsoutstat"), - TEXTURE_PACKETS("texturepacketsstat"), - TRIANGLES_DRAWN("trianglesdrawnstat"), +LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"), + PACKETS_IN("Packets In", "Packets received"), + PACKETS_LOST("packetsloststat", "Packets lost"), + PACKETS_OUT("packetsoutstat", "Packets sent"), + TEXTURE_PACKETS("texturepacketsstat", "Texture data packets received"), CHAT_COUNT("chatcount", "Chat messages sent"), IM_COUNT("imcount", "IMs sent"), - OBJECT_CREATE("objectcreate"), + OBJECT_CREATE("objectcreate", "Number of objects created"), OBJECT_REZ("objectrez", "Object rez count"), LOGIN_TIMEOUTS("logintimeouts", "Number of login attempts that timed out"), LSL_SAVES("lslsaves", "Number of times user has saved a script"), @@ -86,34 +85,35 @@ LLTrace::CountStatHandle<> FPS("framesrendered"), EDIT_TEXTURE("edittexture", "Changes to textures on objects"), KILLED("killed", "Number of times killed"), FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"), - TEX_BAKES("texbakes"), - TEX_REBAKES("texrebakes"), - NUM_NEW_OBJECTS("numnewobjectsstat"); -LLTrace::CountStatHandle > KBIT("kbitstat"), - LAYERS_KBIT("layerskbitstat"), - OBJECT_KBIT("objectkbitstat"), - ASSET_KBIT("assetkbitstat"), - TEXTURE_KBIT("texturekbitstat"), - ACTUAL_IN_KBIT("actualinkbitstat"), - ACTUAL_OUT_KBIT("actualoutkbitstat"); + TEX_BAKES("texbakes", "Number of times avatar textures have been baked"), + TEX_REBAKES("texrebakes", "Number of times avatar textures have been forced to rebake"), + NUM_NEW_OBJECTS("numnewobjectsstat", "Number of objects in scene that were not previously in cache"); + +LLTrace::CountStatHandle > TRIANGLES_DRAWN("trianglesdrawnstat"); + +LLTrace::CountStatHandle > KBIT("Bandwidth", "Network data received"), + LAYERS_KBIT("layerskbitstat", "Network data received for layer data (terrain)"), + OBJECT_KBIT("objectkbitstat", "Network data received for objects"), + ASSET_KBIT("assetkbitstat", "Network data received for assets (animations, sounds)"), + TEXTURE_KBIT("texturekbitstat", "Network data received for textures"), + ACTUAL_IN_KBIT("actualinkbitstat", "Incoming network data"), + ACTUAL_OUT_KBIT("actualoutkbitstat", "Outgoing network data"); LLTrace::CountStatHandle > SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"), SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"), LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%"); -SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "", LL_SIM_STAT_TIME_DILATION), - SIM_FPS("simfps", "", LL_SIM_STAT_FPS), - SIM_PHYSICS_FPS("simphysicsfps", "", LL_SIM_STAT_PHYSFPS), +SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale", LL_SIM_STAT_TIME_DILATION), + SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS), + SIM_PHYSICS_FPS("simphysicsfps", "Simulator physics framerate", LL_SIM_STAT_PHYSFPS), SIM_AGENT_UPS("simagentups", "", LL_SIM_STAT_AGENTUPS), SIM_SCRIPT_EPS("simscripteps", "", LL_SIM_STAT_SCRIPT_EPS), SIM_SKIPPED_SILHOUETTE("simsimskippedsilhouettesteps", "", LL_SIM_STAT_SKIPPEDAISILSTEPS_PS), - SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS), - SIM_MAIN_AGENTS("simmainagents", "", LL_SIM_STAT_NUMAGENTMAIN), - SIM_CHILD_AGENTS("simchildagents", "", LL_SIM_STAT_NUMAGENTCHILD), + SIM_MAIN_AGENTS("simmainagents", "Number of avatars in current region", LL_SIM_STAT_NUMAGENTMAIN), + SIM_CHILD_AGENTS("simchildagents", "Number of avatars in neighboring regions", LL_SIM_STAT_NUMAGENTCHILD), SIM_OBJECTS("simobjects", "", LL_SIM_STAT_NUMTASKS), - SIM_ACTIVE_OBJECTS("simactiveobjects", "", LL_SIM_STAT_NUMTASKSACTIVE), - SIM_ACTIVE_SCRIPTS("simactivescripts", "", LL_SIM_STAT_NUMSCRIPTSACTIVE), - SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN), + SIM_ACTIVE_OBJECTS("simactiveobjects", "Number of scripted and/or mocing objects", LL_SIM_STAT_NUMTASKSACTIVE), + SIM_ACTIVE_SCRIPTS("simactivescripts", "Number of scripted objects", LL_SIM_STAT_NUMSCRIPTSACTIVE), SIM_IN_PACKETS_PER_SEC("siminpps", "", LL_SIM_STAT_INPPS), SIM_OUT_PACKETS_PER_SEC("simoutpps", "", LL_SIM_STAT_OUTPPS), SIM_PENDING_DOWNLOADS("simpendingdownloads", "", LL_SIM_STAT_PENDING_DOWNLOADS), @@ -122,23 +122,25 @@ SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "", LL_SIM_STAT_TIME_DIL SIM_PHYSICS_PINNED_TASKS("physicspinnedtasks", "", LL_SIM_STAT_PHYSICS_PINNED_TASKS), SIM_PHYSICS_LOD_TASKS("physicslodtasks", "", LL_SIM_STAT_PHYSICS_LOD_TASKS); +SimMeasurement > SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN), + SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS); + LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"), NUM_IMAGES("numimagesstat"), NUM_RAW_IMAGES("numrawimagesstat"), NUM_OBJECTS("numobjectsstat"), NUM_ACTIVE_OBJECTS("numactiveobjectsstat"), - NUM_SIZE_CULLED("numsizeculledstat"), - NUM_VIS_CULLED("numvisculledstat"), ENABLE_VBO("enablevbo", "Vertex Buffers Enabled"), LIGHTING_DETAIL("lightingdetail", "Lighting Detail"), VISIBLE_AVATARS("visibleavatars", "Visible Avatars"), SHADER_OBJECTS("shaderobjects", "Object Shaders"), DRAW_DISTANCE("drawdistance", "Draw Distance"), PENDING_VFS_OPERATIONS("vfspendingoperations"), - PACKETS_LOST_PERCENT("packetslostpercentstat"), WINDOW_WIDTH("windowwidth", "Window width"), WINDOW_HEIGHT("windowheight", "Window height"); - + +LLTrace::SampleStatHandle > PACKETS_LOST_PERCENT("packetslostpercentstat"); + static LLTrace::SampleStatHandle CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"); LLTrace::SampleStatHandle > GL_TEX_MEM("gltexmemstat"), @@ -150,38 +152,38 @@ LLTrace::SampleStatHandle > DELTA_BANDWIDTH("del SimMeasurement > SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS), - SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS), - SIM_OTHER_TIME("simsimothermsec", "", LL_SIM_STAT_SIMOTHERMS), - SIM_PHYSICS_TIME("simsimphysicsmsec", "", LL_SIM_STAT_SIMPHYSICSMS), - SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec", "", LL_SIM_STAT_SIMPHYSICSSTEPMS), - SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec", "", LL_SIM_STAT_SIMPHYSICSSHAPEMS), - SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec", "", LL_SIM_STAT_SIMPHYSICSOTHERMS), - SIM_AI_TIME("simsimaistepmsec", "", LL_SIM_STAT_SIMAISTEPTIMEMS), - SIM_AGENTS_TIME("simagentmsec", "", LL_SIM_STAT_AGENTMS), - SIM_IMAGES_TIME("simimagesmsec", "", LL_SIM_STAT_IMAGESMS), - SIM_SCRIPTS_TIME("simscriptmsec", "", LL_SIM_STAT_SCRIPTMS), - SIM_SPARE_TIME("simsparemsec", "", LL_SIM_STAT_SIMSPARETIME), - SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME), - SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME); + SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS), + SIM_OTHER_TIME("simsimothermsec", "", LL_SIM_STAT_SIMOTHERMS), + SIM_PHYSICS_TIME("simsimphysicsmsec", "", LL_SIM_STAT_SIMPHYSICSMS), + SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec", "", LL_SIM_STAT_SIMPHYSICSSTEPMS), + SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec", "", LL_SIM_STAT_SIMPHYSICSSHAPEMS), + SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec", "", LL_SIM_STAT_SIMPHYSICSOTHERMS), + SIM_AI_TIME("simsimaistepmsec", "", LL_SIM_STAT_SIMAISTEPTIMEMS), + SIM_AGENTS_TIME("simagentmsec", "", LL_SIM_STAT_AGENTMS), + SIM_IMAGES_TIME("simimagesmsec", "", LL_SIM_STAT_IMAGESMS), + SIM_SCRIPTS_TIME("simscriptmsec", "", LL_SIM_STAT_SCRIPTMS), + SIM_SPARE_TIME("simsparemsec", "", LL_SIM_STAT_SIMSPARETIME), + SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME), + SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME); -SimMeasurement > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES), - SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); +SimMeasurement > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES); +SimMeasurement > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); LLTrace::SampleStatHandle > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), - FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), - SIM_PING("simpingstat"); + FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), + SIM_PING("simpingstat"); LLTrace::EventStatHandle > AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections"); LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY("loadingwearableslongdelay", "Wearables took too long to load"); LLTrace::EventStatHandle > REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"), - FRAME_STACKTIME("framestacktime", "FRAME_SECS"), - UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"), - NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"), - IMAGE_STACKTIME("imagestacktime", "IMAGE_SECS"), - REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"), - RENDER_STACKTIME("renderstacktime", "RENDER_SECS"); + FRAME_STACKTIME("framestacktime", "FRAME_SECS"), + UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"), + NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"), + IMAGE_STACKTIME("imagestacktime", "IMAGE_SECS"), + REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"), + RENDER_STACKTIME("renderstacktime", "RENDER_SECS"); LLTrace::EventStatHandle > AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"), @@ -189,8 +191,6 @@ LLTrace::EventStatHandle > AVATAR_EDIT_TIME("avata FPS_10_TIME("fps10time", "Seconds below 10 FPS"), FPS_8_TIME("fps8time", "Seconds below 8 FPS"), FPS_2_TIME("fps2time", "Seconds below 2 FPS"); - - } LLViewerStats::LLViewerStats() @@ -378,17 +378,7 @@ void update_statistics() gTextureTimer.unpause(); } - { - static F32 visible_avatar_frames = 0.f; - static F32 avg_visible_avatars = 0; - F32 visible_avatars = (F32)LLVOAvatar::sNumVisibleAvatars; - if (visible_avatars > 0.f) - { - visible_avatar_frames = 1.f; - avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; - } - sample(LLStatViewer::VISIBLE_AVATARS, (F64)avg_visible_avatars); - } + sample(LLStatViewer::VISIBLE_AVATARS, LLVOAvatar::sNumVisibleAvatars); LLWorld::getInstance()->updateNetStats(); LLWorld::getInstance()->requestCacheMisses(); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 879f0067b9..59d4df124b 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -72,7 +72,6 @@ extern LLTrace::CountStatHandle<> FPS, PACKETS_LOST, PACKETS_OUT, TEXTURE_PACKETS, - TRIANGLES_DRAWN, CHAT_COUNT, IM_COUNT, OBJECT_CREATE, @@ -93,6 +92,7 @@ extern LLTrace::CountStatHandle<> FPS, TEX_REBAKES, NUM_NEW_OBJECTS; +extern LLTrace::CountStatHandle > TRIANGLES_DRAWN; extern LLTrace::CountStatHandle > KBIT, LAYERS_KBIT, @@ -112,13 +112,11 @@ extern SimMeasurement<> SIM_TIME_DILATION, SIM_AGENT_UPS, SIM_SCRIPT_EPS, SIM_SKIPPED_SILHOUETTE, - SIM_SKIPPED_CHARACTERS_PERCENTAGE, SIM_MAIN_AGENTS, SIM_CHILD_AGENTS, SIM_OBJECTS, SIM_ACTIVE_OBJECTS, SIM_ACTIVE_SCRIPTS, - SIM_PERCENTAGE_SCRIPTS_RUN, SIM_IN_PACKETS_PER_SEC, SIM_OUT_PACKETS_PER_SEC, SIM_PENDING_DOWNLOADS, @@ -127,23 +125,25 @@ extern SimMeasurement<> SIM_TIME_DILATION, SIM_PHYSICS_PINNED_TASKS, SIM_PHYSICS_LOD_TASKS; +extern SimMeasurement > SIM_PERCENTAGE_SCRIPTS_RUN, + SIM_SKIPPED_CHARACTERS_PERCENTAGE; + extern LLTrace::SampleStatHandle<> FPS_SAMPLE, NUM_IMAGES, NUM_RAW_IMAGES, NUM_OBJECTS, NUM_ACTIVE_OBJECTS, - NUM_SIZE_CULLED, - NUM_VIS_CULLED, ENABLE_VBO, LIGHTING_DETAIL, VISIBLE_AVATARS, SHADER_OBJECTS, DRAW_DISTANCE, PENDING_VFS_OPERATIONS, - PACKETS_LOST_PERCENT, WINDOW_WIDTH, WINDOW_HEIGHT; +extern LLTrace::SampleStatHandle > PACKETS_LOST_PERCENT; + extern LLTrace::SampleStatHandle > GL_TEX_MEM, GL_BOUND_MEM, RAW_MEM, @@ -165,8 +165,8 @@ extern SimMeasurement > SIM_FRAME_TIME, SIM_SLEEP_TIME, SIM_PUMP_IO_TIME; -extern SimMeasurement > SIM_UNACKED_BYTES, - SIM_PHYSICS_MEM; +extern SimMeasurement > SIM_UNACKED_BYTES; +extern SimMeasurement > SIM_PHYSICS_MEM; extern LLTrace::SampleStatHandle > FRAMETIME_JITTER, diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 34f2c8f6e6..b8de5871ea 100755 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -48,8 +48,8 @@ const F32 MIN_FRACTIONAL = 0.2f; const F32 MIN_BANDWIDTH = 50.f; const F32 MAX_BANDWIDTH = 3000.f; const F32 STEP_FRACTIONAL = 0.1f; -const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s -const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s +const LLUnit TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s +const LLUnit EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s const F32 DYNAMIC_UPDATE_DURATION = 5.0f; // seconds LLViewerThrottle gViewerThrottle; @@ -304,7 +304,7 @@ void LLViewerThrottle::updateDynamicThrottle() } mUpdateTimer.reset(); - F32 mean_packets_lost = LLViewerStats::instance().getRecording().getMean(LLStatViewer::PACKETS_LOST_PERCENT); + LLUnit mean_packets_lost = LLViewerStats::instance().getRecording().getMean(LLStatViewer::PACKETS_LOST_PERCENT); if (mean_packets_lost > TIGHTEN_THROTTLE_THRESHOLD) { if (mThrottleFrac <= MIN_FRACTIONAL || mCurrentBandwidth / 1024.0f <= MIN_BANDWIDTH) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index a95adbf442..d45a62b223 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -711,7 +711,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - F32 bits = 0.f; + LLUnit bits = 0.f; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -729,19 +729,18 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); - S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); + LLUnit actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); + LLUnit actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, LLUnit(actual_in_bits)); - add(LLStatViewer::ACTUAL_OUT_KBIT, LLUnit(actual_out_bits)); - add(LLStatViewer::KBIT, LLUnit(bits)); + add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits); + add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits); + add(LLStatViewer::KBIT, bits); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - F32 packet_loss = 100.f * ((F32)packets_lost/(F32)packets_in); - sample(LLStatViewer::PACKETS_LOST_PERCENT, packet_loss); + sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c2f5b9b861..76ecd84e11 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4686,7 +4686,7 @@ void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type) } record(sStatBatchSize, count); - add(LLStatViewer::TRIANGLES_DRAWN, count); + add(LLStatViewer::TRIANGLES_DRAWN, LLUnits::Triangles::fromValue(count)); if (LLPipeline::sRenderFrameTest) { diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index 0493f487d4..def660e1e4 100755 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -1,838 +1,379 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3