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 From c95042db3e8d2f1a938e7d6e9ca625700d634639 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Jul 2013 00:52:31 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console improved calculation of display range for stat bars --- .../newview/skins/default/xui/en/floater_stats.xml | 110 +++++++-------------- 1 file changed, 37 insertions(+), 73 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index def660e1e4..ad7094c6d8 100755 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -35,10 +35,9 @@ unit_label="frames" stat="FPS" decimal_digits="1" - bar_max="60" show_bar="true" show_history="true"/> - @@ -48,8 +47,7 @@ decimal_digits="3"/> + stat="simpingstat"/> + bar_max="1" /> + bar_max="45" /> + bar_max="45" /> + stat="physicspinnedtasks"/> + stat="physicslodtasks"/> + decimal_digits="1"/> + decimal_digits="1"/> + bar_max="80"/> + stat="simchildagents"/> + bar_max="30000" /> + bar_max="5000"/> + bar_max="15000"/> + decimal_digits="3"/> + unit_label="eps"/> + decimal_digits="3"/> + decimal_digits="1"/> + unit_label="pkt/sec"/> + unit_label="pkt/sec"/> + stat="simpendingdownloads"/> + stat="simpendinguploads"/> + decimal_digits="1"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> + decimal_digits="3"/> - + --> -- cgit v1.2.3 From 11e14cd3b0f58225a96b9b7a9839a7f030fe4045 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Jul 2013 11:05:57 -0700 Subject: SH-4299Interesting: High fps shown temporarily off scale in statistics console various fixes to lltrace start() on started recording no longer resets fixed various instances of unit forgetfullness in lltrace recording split now has gapless timing scene monitor now guarantees min sample time renamed a bunch of stats added names to debug thread view on windows --- indra/newview/llappviewer.cpp | 1 + indra/newview/llscenemonitor.cpp | 36 ++++++++++----- indra/newview/llscenemonitor.h | 2 +- indra/newview/llstatusbar.cpp | 2 +- indra/newview/lltexturefetch.cpp | 4 +- indra/newview/lltexturefetch.h | 8 ++-- indra/newview/lltextureview.cpp | 4 +- indra/newview/llviewerassetstats.cpp | 47 +++++++++---------- indra/newview/llviewerstats.cpp | 52 ++++++++++++---------- indra/newview/llviewerstats.h | 14 +++--- indra/newview/llviewertexturelist.cpp | 6 +-- indra/newview/llviewerwindow.cpp | 2 + indra/newview/llworld.cpp | 10 ++--- .../default/xui/en/floater_scene_load_stats.xml | 28 ++++++------ .../newview/skins/default/xui/en/floater_stats.xml | 32 ++++++------- 15 files changed, 135 insertions(+), 113 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5f6b183fcc..47492aaa31 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1294,6 +1294,7 @@ bool LLAppViewer::mainLoop() { LLFastTimer _(FTM_FRAME); LLTrace::TimeBlock::processTimes(); + llassert(LLStatViewer::FPS.getPrimaryAccumulator()->getSampleCount() <= 1); LLTrace::get_frame_recording().nextPeriod(); LLTrace::TimeBlock::logStats(); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 342b45863a..eec4a703a1 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -256,7 +256,7 @@ void LLSceneMonitor::unfreezeScene() void LLSceneMonitor::capture() { - static U32 last_capture_time = 0; + static U32 last_capture_frame = 0; static LLCachedControl monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled"); static LLCachedControl scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime"); static LLFrameTimer timer; @@ -268,11 +268,11 @@ void LLSceneMonitor::capture() if(mEnabled) { unfreezeScene(); + reset(); force_capture = true; } else { - reset(); freezeScene(); } @@ -280,8 +280,8 @@ void LLSceneMonitor::capture() } if (mEnabled - && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f - || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f)) + && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f + || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f)) { reset(); freezeScene(); @@ -290,9 +290,10 @@ void LLSceneMonitor::capture() if((timer.getElapsedTimeF32() > scene_load_sample_time() || force_capture) + && mDiffState == WAITING_FOR_NEXT_DIFF && mEnabled && LLGLSLShader::sNoFixedFunction - && last_capture_time != gFrameCount) + && last_capture_frame != gFrameCount) { force_capture = false; @@ -301,7 +302,7 @@ void LLSceneMonitor::capture() timer.reset(); - last_capture_time = gFrameCount; + last_capture_frame = gFrameCount; LLRenderTarget& cur_target = getCaptureTarget(); @@ -465,7 +466,11 @@ void LLSceneMonitor::fetchQueryResult() { LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF); - if(mDiffState == WAIT_ON_RESULT) + // also throttle timing here, to avoid going below sample time due to phasing with frame capture + static LLCachedControl scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime"); + static LLFrameTimer timer; + + if(mDiffState == WAIT_ON_RESULT && timer.getElapsedTimeF32() > scene_load_sample_time) { mDiffState = WAITING_FOR_NEXT_DIFF; @@ -479,7 +484,7 @@ void LLSceneMonitor::fetchQueryResult() mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face) LL_DEBUGS("SceneMonitor") << "Frame difference: " << std::setprecision(4) << mDiffResult << LL_ENDL; - record(sFramePixelDiff, mDiffResult); + record(sFramePixelDiff, sqrtf(mDiffResult)); static LLCachedControl diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold"); if(mDiffResult > diff_threshold()) @@ -488,7 +493,7 @@ void LLSceneMonitor::fetchQueryResult() } else { - mSceneLoadRecording.getPotentialRecording().nextPeriod(); + mSceneLoadRecording.nextPeriod(); } } } @@ -506,7 +511,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) os << std::setprecision(10); - PeriodicRecording& scene_load_recording = mSceneLoadRecording.getAcceptedRecording(); + PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults(); const U32 frame_count = scene_load_recording.getNumRecordedPeriods(); LLUnit frame_time; @@ -519,6 +524,15 @@ void LLSceneMonitor::dumpToFile(std::string file_name) } os << '\n'; + os << "Sample period(s)"; + for (S32 frame = 1; frame <= frame_count; frame++) + { + frame_time = scene_load_recording.getPrevRecording(frame_count - frame).getDuration(); + os << ", " << frame_time.value(); + } + os << '\n'; + + typedef TraceType trace_count; for (trace_count::instance_iter it = trace_count::beginInstances(), end_it = trace_count::endInstances(); it != end_it; @@ -697,7 +711,7 @@ void LLSceneMonitorView::draw() LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP); lines++; - num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getAcceptedRecording().getDuration().value()); + num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getResults().getDuration().value()); LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP); lines++; diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index 9717310da4..7088d529d6 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -62,7 +62,7 @@ public: const LLTrace::ExtendablePeriodicRecording* getRecording() const {return &mSceneLoadRecording;} void dumpToFile(std::string file_name); - bool hasResults() const { return mSceneLoadRecording.getAcceptedRecording().getDuration() != 0;} + bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != 0;} private: void freezeScene(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index f3406d9f8d..b385d5cdfa 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -198,7 +198,7 @@ BOOL LLStatusBar::postBuild() sgp.rect(r); sgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); sgp.mouse_opaque(false); - sgp.stat.count_stat_float(&LLStatViewer::KBIT); + sgp.stat.count_stat_float(&LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED); sgp.units("Kbps"); sgp.precision(0); mSGBandwidth = LLUICtrlFactory::create(sgp); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 6716391f41..d85247c4ec 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1483,7 +1483,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mGetReason.clear(); LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << mRequestedOffset << " Bytes: " << mRequestedSize - << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth().value() << "/" << mFetcher->mMaxBandwidth << LL_ENDL; // Will call callbackHttpGet when curl request completes @@ -2891,7 +2891,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) mNetworkQueueMutex.lock(); // +Mfnq mMaxBandwidth = band_width; - add(LLStatViewer::TEXTURE_KBIT, mHTTPTextureBits); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits); mHTTPTextureBits = 0; mNetworkQueueMutex.unlock(); // -Mfnq diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 109f2bd401..38272b40dc 100755 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -107,10 +107,10 @@ public: bool receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data); // Threads: T* (but not safe) - void setTextureBandwidth(F32 bandwidth) { mTextureBandwidth = bandwidth; } + void setTextureBandwidth(LLUnit bandwidth) { mTextureBandwidth = bandwidth; } // Threads: T* (but not safe) - F32 getTextureBandwidth() { return mTextureBandwidth; } + LLUnit getTextureBandwidth() { return mTextureBandwidth; } // Threads: T* BOOL isFromLocalCache(const LLUUID& id); @@ -325,8 +325,8 @@ private: queue_t mHTTPTextureQueue; // Mfnq typedef std::map > cancel_queue_t; cancel_queue_t mCancelQueue; // Mfnq - F32 mTextureBandwidth; // - F32 mMaxBandwidth; // Mfnq + LLUnit mTextureBandwidth; // + LLUnit mMaxBandwidth; // Mfnq LLTextureInfo mTextureInfo; // XXX possible delete diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 72ed3d4485..20e8a522cd 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - F32 bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - F32 max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + LLUnit bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); + LLUnit max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 80412c215f..5f11a2b519 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -153,29 +153,29 @@ namespace LLViewerAssetStatsFF }; if (at < 0 || at >= LLViewerAssetType::AT_COUNT) -{ + { return EVACOtherGet; -} + } EViewerAssetCategories ret(asset_to_bin_map[at]); if (EVACTextureTempHTTPGet == ret) { // Indexed with [is_temp][with_http] static const EViewerAssetCategories texture_bin_map[2][2] = -{ - { + { + { EVACTextureNonTempUDPGet, - EVACTextureNonTempHTTPGet, + EVACTextureNonTempHTTPGet, }, { EVACTextureTempUDPGet, - EVACTextureTempHTTPGet, - } + EVACTextureTempHTTPGet, + } }; ret = texture_bin_map[is_temp][with_http]; } return ret; -} + } static LLTrace::CountStatHandle<> sEnqueueAssetRequestsTempTextureHTTP ("enqueuedassetrequeststemptexturehttp", "Number of temporary texture asset http requests enqueued"), @@ -384,50 +384,50 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) .resp_min(rec.getMin(*sResponse[EVACTextureTempHTTPGet]).value()) .resp_max(rec.getMax(*sResponse[EVACTextureTempHTTPGet]).value()) .resp_mean(rec.getMean(*sResponse[EVACTextureTempHTTPGet]).value()); -} + } if (!compact_output || rec.getSum(*sEnqueued[EVACTextureTempUDPGet]) || rec.getSum(*sDequeued[EVACTextureTempUDPGet]) || rec.getSum(*sResponse[EVACTextureTempUDPGet]).value()) -{ + { r.get_texture_temp_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureTempUDPGet])) .dequeued((S32)rec.getSum(*sDequeued[EVACTextureTempUDPGet])) .resp_count((S32)rec.getSum(*sResponse[EVACTextureTempUDPGet]).value()) .resp_min(rec.getMin(*sResponse[EVACTextureTempUDPGet]).value()) .resp_max(rec.getMax(*sResponse[EVACTextureTempUDPGet]).value()) .resp_mean(rec.getMean(*sResponse[EVACTextureTempUDPGet]).value()); -} + } if (!compact_output || rec.getSum(*sEnqueued[EVACTextureNonTempHTTPGet]) || rec.getSum(*sDequeued[EVACTextureNonTempHTTPGet]) || rec.getSum(*sResponse[EVACTextureNonTempHTTPGet]).value()) -{ + { r.get_texture_non_temp_http .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureNonTempHTTPGet])) .dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempHTTPGet])) .resp_count((S32)rec.getSum(*sResponse[EVACTextureNonTempHTTPGet]).value()) .resp_min(rec.getMin(*sResponse[EVACTextureNonTempHTTPGet]).value()) .resp_max(rec.getMax(*sResponse[EVACTextureNonTempHTTPGet]).value()) .resp_mean(rec.getMean(*sResponse[EVACTextureNonTempHTTPGet]).value()); -} + } if (!compact_output || rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet]) || rec.getSum(*sDequeued[EVACTextureNonTempUDPGet]) || rec.getSum(*sResponse[EVACTextureNonTempUDPGet]).value()) -{ + { r.get_texture_non_temp_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet])) .dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempUDPGet])) .resp_count((S32)rec.getSum(*sResponse[EVACTextureNonTempUDPGet]).value()) .resp_min(rec.getMin(*sResponse[EVACTextureNonTempUDPGet]).value()) .resp_max(rec.getMax(*sResponse[EVACTextureNonTempUDPGet]).value()) .resp_mean(rec.getMean(*sResponse[EVACTextureNonTempUDPGet]).value()); -} + } if (!compact_output || rec.getSum(*sEnqueued[EVACWearableUDPGet]) || rec.getSum(*sDequeued[EVACWearableUDPGet]) || rec.getSum(*sResponse[EVACWearableUDPGet]).value()) -{ + { r.get_wearable_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACWearableUDPGet])) .dequeued((S32)rec.getSum(*sDequeued[EVACWearableUDPGet])) .resp_count((S32)rec.getSum(*sResponse[EVACWearableUDPGet]).value()) @@ -478,16 +478,16 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) S32 fps = (S32)rec.getLastValue(LLStatViewer::FPS_SAMPLE); if (!compact_output || fps != 0) { - r.fps.count(fps); - r.fps.min(rec.getMin(LLStatViewer::FPS_SAMPLE)); - r.fps.max(rec.getMax(LLStatViewer::FPS_SAMPLE)); - r.fps.mean(rec.getMean(LLStatViewer::FPS_SAMPLE)); + r.fps .count(fps) + .min(rec.getMin(LLStatViewer::FPS_SAMPLE)) + .max(rec.getMax(LLStatViewer::FPS_SAMPLE)) + .mean(rec.getMean(LLStatViewer::FPS_SAMPLE)); } U32 grid_x(0), grid_y(0); grid_from_region_handle(it->first, &grid_x, &grid_y); - r.grid_x(grid_x); - r.grid_y(grid_y); - r.duration(LLUnit(rec.getDuration()).value()); + r .grid_x(grid_x) + .grid_y(grid_y) + .duration(LLUnit(rec.getDuration()).value()); } stats.duration(mCurRecording ? LLUnit(mCurRecording->getDuration()).value() : 0.0); @@ -526,6 +526,7 @@ void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp) { const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); + llinfos << "enqueue " << int(eac) << llendl; add(*sEnqueued[int(eac)], 1); } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index d753619daa..69a6c00a8f 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -89,19 +89,22 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"), 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%"); +LLTrace::CountStatHandle > + TRIANGLES_DRAWN("trianglesdrawnstat"); + +LLTrace::CountStatHandle > + ACTIVE_MESSAGE_DATA_RECEIVED("activemessagedatareceived", "Message system data received on all active regions"), + LAYERS_NETWORK_DATA_RECEIVED("layersdatareceived", "Network data received for layer data (terrain)"), + OBJECT_NETWORK_DATA_RECEIVED("objectdatareceived", "Network data received for objects"), + ASSET_UDP_DATA_RECEIVED("assetudpdatareceived", "Network data received for assets (animations, sounds) over UDP message system"), + TEXTURE_NETWORK_DATA_RECEIVED("texturedatareceived", "Network data received for textures"), + MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"), + MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system 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", "Simulator time scale", LL_SIM_STAT_TIME_DILATION), SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS), @@ -122,8 +125,9 @@ SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale", 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); +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"), @@ -139,9 +143,11 @@ LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"), WINDOW_WIDTH("windowwidth", "Window width"), WINDOW_HEIGHT("windowheight", "Window height"); -LLTrace::SampleStatHandle > PACKETS_LOST_PERCENT("packetslostpercentstat"); +LLTrace::SampleStatHandle > + PACKETS_LOST_PERCENT("packetslostpercentstat"); -static LLTrace::SampleStatHandle CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"); +static LLTrace::SampleStatHandle + CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"); LLTrace::SampleStatHandle > GL_TEX_MEM("gltexmemstat"), GL_BOUND_MEM("glboundmemstat"), @@ -197,12 +203,10 @@ LLViewerStats::LLViewerStats() : mLastTimeDiff(0.0) { mRecording.start(); - LLTrace::get_frame_recording().start(); } LLViewerStats::~LLViewerStats() -{ -} +{} void LLViewerStats::resetStats() { @@ -363,10 +367,10 @@ void update_statistics() add(LLStatViewer::FPS, 1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - add(LLStatViewer::LAYERS_KBIT, LLUnit(layer_bits)); - add(LLStatViewer::OBJECT_KBIT, gObjectData); + add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, LLUnit(layer_bits)); + add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData); sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending()); - add(LLStatViewer::ASSET_KBIT, LLUnit(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); + add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, LLUnit(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) @@ -393,7 +397,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - gTotalTextureData = LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT); + gTotalTextureData = LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED); texture_stats_timer.reset(); } } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 59d4df124b..3b7079ae4b 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -94,13 +94,13 @@ extern LLTrace::CountStatHandle<> FPS, extern LLTrace::CountStatHandle > TRIANGLES_DRAWN; -extern LLTrace::CountStatHandle > KBIT, - LAYERS_KBIT, - OBJECT_KBIT, - ASSET_KBIT, - TEXTURE_KBIT, - ACTUAL_IN_KBIT, - ACTUAL_OUT_KBIT; +extern LLTrace::CountStatHandle > ACTIVE_MESSAGE_DATA_RECEIVED, + LAYERS_NETWORK_DATA_RECEIVED, + OBJECT_NETWORK_DATA_RECEIVED, + ASSET_UDP_DATA_RECEIVED, + TEXTURE_NETWORK_DATA_RECEIVED, + MESSAGE_SYSTEM_DATA_IN, + MESSAGE_SYSTEM_DATA_OUT; extern LLTrace::CountStatHandle > SIM_20_FPS_TIME, SIM_PHYSICS_20_FPS_TIME, diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 431a3b330c..dfd7ac983d 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -663,7 +663,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED)); { using namespace LLStatViewer; @@ -1374,7 +1374,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1448,7 +1448,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_KBIT, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 85e4e6bc08..10e354f2e3 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -215,6 +215,7 @@ // Globals // void render_ui(F32 zoom_factor = 1.f, int subfield = 0); +void swap(); extern BOOL gDebugClicks; extern BOOL gDisplaySwapBuffers; @@ -4405,6 +4406,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // Required for showing the GUI in snapshots and performing bloom composite overlay // Call even if show_ui is FALSE render_ui(scale_factor, subfield); + swap(); } for (U32 out_y = 0; out_y < read_height ; out_y++) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index d45a62b223..3dfe4c5e5f 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -732,9 +732,9 @@ void LLWorld::updateNetStats() LLUnit actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); LLUnit actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits); - add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits); - add(LLStatViewer::KBIT, bits); + add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); + add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); + add(LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED, bits); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); @@ -743,8 +743,8 @@ void LLWorld::updateNetStats() sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); } - mLastPacketsIn = gMessageSystem->mPacketsIn; - mLastPacketsOut = gMessageSystem->mPacketsOut; + mLastPacketsIn = gMessageSystem->mPacketsIn; + mLastPacketsOut = gMessageSystem->mPacketsOut; mLastPacketsLost = gMessageSystem->mDroppedPackets; } diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml index 246e8bb256..71ff961c59 100644 --- a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml @@ -45,10 +45,10 @@ unit_scale="100" precision="0"/> @@ -159,55 +159,55 @@ tick_spacing="128.f" precision="1" show_bar="false"/> - - - - - - - + -- cgit v1.2.3