diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 1 |
3 files changed, 24 insertions, 26 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5b69fd80af..bf0f948a6d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1638,14 +1638,14 @@ bool LLAppViewer::cleanup() { llinfos << "Analyzing performance" << llendl; - std::string baselineName = LLFastTimer::sLogName + "_baseline.slp"; - std::string currentName = LLFastTimer::sLogName + ".slp"; - std::string reportName = LLFastTimer::sLogName + "_report.csv"; + std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp"; + std::string current_name = LLFastTimer::sLogName + ".slp"; + std::string report_name = LLFastTimer::sLogName + "_report.csv"; LLFastTimerView::doAnalysis( - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baselineName), - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, currentName), - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, reportName)); + gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name), + gDirUtilp->getExpandedFilename(LL_PATH_LOGS, current_name), + gDirUtilp->getExpandedFilename(LL_PATH_LOGS, report_name)); } LLMetricPerformanceTesterBasic::cleanClass() ; @@ -2117,8 +2117,8 @@ bool LLAppViewer::initConfiguration() llinfos << "'--logmetrics' argument : " << test_name << llendl; if (test_name == "") { - llwarns << "No '--logmetrics' argument given, will output all metrics." << llendl; - LLFastTimer::sLogName = std::string("metric"); + llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl; + LLFastTimer::sLogName = DEFAULT_METRIC_NAME; } else { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2b27f308df..6160510c0e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -288,12 +288,6 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const s return gTextureList.getImageFromUrl(url, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; } -//static -bool LLViewerTextureManager::perfStatsEnabled() -{ - return (sTesterp != NULL); -} - LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host) { return gTextureList.getImageFromHost(image_id, host) ; @@ -348,7 +342,7 @@ void LLViewerTextureManager::init() LLViewerTexture::initClass() ; - if (LLFastTimer::sMetricLog && !perfStatsEnabled() && ((LLFastTimer::sLogName == sTesterName) || (LLFastTimer::sLogName == "metric"))) + if (LLMetricPerformanceTesterBasic::isMetricLogRequested(sTesterName) && !LLMetricPerformanceTesterBasic::getTester(sTesterName)) { sTesterp = new LLTexturePipelineTester() ; if (!sTesterp->isValid()) @@ -420,9 +414,10 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity { sCurrentTime = gFrameTimeSeconds ; - if (LLViewerTextureManager::perfStatsEnabled()) + LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); + if (tester) { - LLViewerTextureManager::sTesterp->update() ; + tester->update() ; } LLViewerMediaTexture::updateClass() ; @@ -615,9 +610,10 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) //check if there is cached raw image and switch to it if possible switchToCachedImage() ; - if (LLViewerTextureManager::perfStatsEnabled()) + LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); + if (tester) { - LLViewerTextureManager::sTesterp->updateGrayTextureBinding() ; + tester->updateGrayTextureBinding() ; } return res; } @@ -1078,9 +1074,10 @@ BOOL LLViewerTexture::isLargeImage() //virtual void LLViewerTexture::updateBindStatsForTester() { - if (LLViewerTextureManager::perfStatsEnabled()) + LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); + if (tester) { - LLViewerTextureManager::sTesterp->updateTextureBindingStats(this) ; + tester->updateTextureBindingStats(this) ; } } @@ -1861,10 +1858,11 @@ bool LLViewerFetchedTexture::updateFetch() // We may have data ready regardless of whether or not we are finished (e.g. waiting on write) if (mRawImage.notNull()) { - if (LLViewerTextureManager::perfStatsEnabled()) + LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); + if (tester) { mIsFetched = TRUE ; - LLViewerTextureManager::sTesterp->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)) ; + tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)) ; } mRawDiscardLevel = fetch_discard; if ((mRawImage->getDataSize() > 0 && mRawDiscardLevel >= 0) && @@ -3088,9 +3086,10 @@ void LLViewerLODTexture::scaleDown() { switchToCachedImage() ; - if (LLViewerTextureManager::perfStatsEnabled()) + LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); + if (tester) { - LLViewerTextureManager::sTesterp->setStablizingTime() ; + tester->setStablizingTime() ; } } } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 88d449e061..b5636bbdc7 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -676,7 +676,6 @@ private: public: //texture pipeline tester static LLTexturePipelineTester* sTesterp ; - static bool perfStatsEnabled(); //returns NULL if tex is not a LLViewerFetchedTexture nor derived from LLViewerFetchedTexture. static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, BOOL report_error = FALSE) ; |