diff options
Diffstat (limited to 'indra/newview')
27 files changed, 162 insertions, 162 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index a17a4e5e21..9311056a27 100755 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -39,7 +39,7 @@ const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days b struct ConversationParams : public LLInitParam::Block<ConversationParams> { - Mandatory<LLUnit<U64, LLUnits::Seconds> > time; + Mandatory<U64Seconds > time; Mandatory<std::string> timestamp; Mandatory<SessionType> conversation_type; Mandatory<std::string> conversation_name, @@ -113,7 +113,7 @@ void LLConversation::onIMFloaterShown(const LLUUID& session_id) } // static -const std::string LLConversation::createTimestamp(const LLUnit<U64, LLUnits::Seconds>& utc_time) +const std::string LLConversation::createTimestamp(const U64Seconds& utc_time) { std::string timeStr; LLSD substitution; @@ -132,7 +132,7 @@ const std::string LLConversation::createTimestamp(const LLUnit<U64, LLUnits::Sec bool LLConversation::isOlderThan(U32 days) const { - LLUnit<U64, LLUnits::Seconds> now(time_corrected()); + U64Seconds now(time_corrected()); LLUnit<U32, LLUnits::Days> age = now - mTime; return age > days; diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 5d94cb6497..fd6ad9ad66 100755 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -55,7 +55,7 @@ public: const LLUUID& getSessionID() const { return mSessionID; } const LLUUID& getParticipantID() const { return mParticipantID; } const std::string& getTimestamp() const { return mTimestamp; } - const LLUnit<U64, LLUnits::Seconds>& + const U64Seconds& getTime() const { return mTime; } bool hasOfflineMessages() const { return mHasOfflineIMs; } @@ -76,7 +76,7 @@ public: /* * returns string representation(in form of: mm/dd/yyyy hh:mm) of time when conversation was started */ - static const std::string createTimestamp(const LLUnit<U64, LLUnits::Seconds>& utc_time); + static const std::string createTimestamp(const U64Seconds& utc_time); private: @@ -88,7 +88,7 @@ private: boost::signals2::connection mIMFloaterShowedConnection; - LLUnit<U64, LLUnits::Seconds> mTime; // last interaction time + U64Seconds mTime; // last interaction time SessionType mConversationType; std::string mConversationName; std::string mHistoryFileName; diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index bd5e0b8f88..93719ac7fb 100755 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -518,8 +518,8 @@ bool LLConversationLogListNameComparator::doCompare(const LLConversationLogListI bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const { - LLUnit<U64, LLUnits::Seconds> date1 = conversation1->getConversation()->getTime(); - LLUnit<U64, LLUnits::Seconds> date2 = conversation2->getConversation()->getTime(); + U64Seconds date1 = conversation1->getConversation()->getTime(); + U64Seconds date2 = conversation2->getConversation()->getTime(); const LLUUID& id1 = conversation1->getConversation()->getParticipantID(); const LLUUID& id2 = conversation2->getConversation()->getParticipantID(); diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 11a9a70b18..725a2f2daf 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -260,7 +260,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) TimerBarRow& row = mHoverBarIndex == 0 ? mAverageTimerRow : mTimerBarRows[mScrollIndex + mHoverBarIndex - 1]; TimerBar* hover_bar = NULL; - LLUnits::F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; + F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; for (int bar_index = 0, end_index = LLInstanceTracker<LLTrace::TimeBlock>::instanceCount(); bar_index < end_index; ++bar_index) @@ -317,11 +317,11 @@ static std::string get_tooltip(TimeBlock& timer, S32 history_index, PeriodicReco if (history_index == 0) { // by default, show average number of call - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit<F64, LLUnits::Milliseconds>(frame_recording.getPeriodMean (timer, RUNNING_AVERAGE_WIDTH)).value(), (S32)frame_recording.getPeriodMean(timer.callCount(), RUNNING_AVERAGE_WIDTH)); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPeriodMean (timer, RUNNING_AVERAGE_WIDTH)).value(), (S32)frame_recording.getPeriodMean(timer.callCount(), RUNNING_AVERAGE_WIDTH)); } else { - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit<F64, LLUnits::Milliseconds>(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); } return tooltip; } @@ -996,7 +996,7 @@ void LLFastTimerView::printLineStats() } first = false; - LLUnits::F32Seconds ticks; + F32Seconds ticks; if (mStatsIndex == 0) { ticks = mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH); @@ -1005,7 +1005,7 @@ void LLFastTimerView::printLineStats() { ticks = mRecording.getPrevRecording(mStatsIndex).getSum(*idp); } - LLUnit<F32, LLUnits::Milliseconds> ms = ticks; + F32Milliseconds ms = ticks; timer_stat += llformat("%.1f",ms.value()); @@ -1029,7 +1029,7 @@ void LLFastTimerView::drawLineGraph() LLLocalClipRect clip(mGraphRect); //normalize based on last frame's maximum - static LLUnits::F32Seconds max_time(0.000001); + static F32Seconds max_time(0.000001); static U32 max_calls = 0; static F32 alpha_interp = 0.f; @@ -1060,7 +1060,7 @@ void LLFastTimerView::drawLineGraph() } } - LLUnits::F32Seconds cur_max(0); + F32Seconds cur_max(0); U32 cur_max_calls = 0; for(timer_tree_iterator_t it = begin_timer_tree(FTM_FRAME); it != end_timer_tree(); @@ -1101,7 +1101,7 @@ void LLFastTimerView::drawLineGraph() j--) { LLTrace::Recording& recording = mRecording.getPrevRecording(j); - LLUnits::F32Seconds time = llmax(recording.getSum(*idp), LLUnits::F64Seconds(0.000001)); + F32Seconds time = llmax(recording.getSum(*idp), F64Seconds(0.000001)); U32 calls = recording.getSum(idp->callCount()); if (is_hover_timer) @@ -1146,7 +1146,7 @@ void LLFastTimerView::drawLineGraph() max_time = lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f)); if (llabs((max_time - cur_max).value()) <= 1) { - max_time = llmax(LLUnits::F32Microseconds(1.f), LLUnits::F32Microseconds(cur_max)); + max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max)); } max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); @@ -1179,7 +1179,7 @@ void LLFastTimerView::drawLineGraph() switch(mDisplayType) { case DISPLAY_TIME: - axis_label = llformat("%4.2f ms", LLUnit<F32, LLUnits::Milliseconds>(max_time).value()); + axis_label = llformat("%4.2f ms", F32Milliseconds(max_time).value()); break; case DISPLAY_CALLS: axis_label = llformat("%d calls", (int)max_calls); @@ -1230,7 +1230,7 @@ void LLFastTimerView::drawLegend() llassert(idp->getIndex() < sTimerColors.size()); gl_rect_2d(bar_rect, sTimerColors[idp->getIndex()]); - LLUnit<F32, LLUnits::Milliseconds> ms(0); + F32Milliseconds ms(0); S32 calls = 0; if (mHoverBarIndex > 0 && mHoverID) { @@ -1240,7 +1240,7 @@ void LLFastTimerView::drawLegend() } else { - ms = LLUnits::F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH)); + ms = F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH)); calls = (S32)mRecording.getPeriodMean(idp->callCount(), RUNNING_AVERAGE_WIDTH); } @@ -1346,7 +1346,7 @@ void LLFastTimerView::drawTicks() { // Draw MS ticks { - LLUnit<U32, LLUnits::Milliseconds> ms = mTotalTimeDisplay; + U32Milliseconds ms = mTotalTimeDisplay; std::string tick_label; S32 x; S32 barw = mBarRect.getWidth(); @@ -1423,7 +1423,7 @@ void LLFastTimerView::updateTotalTime() mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME, 20); break; default: - mTotalTimeDisplay = LLUnits::F64Milliseconds(100); + mTotalTimeDisplay = F64Milliseconds(100); break; } @@ -1511,14 +1511,14 @@ void LLFastTimerView::drawBars() static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); -LLUnits::F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) +F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) { LLFastTimer _(FTM_UPDATE_TIMER_BAR_WIDTHS); - const LLUnits::F32Seconds self_time = history_index == -1 + const F32Seconds self_time = history_index == -1 ? mRecording.getPeriodMean(time_block->selfTime(), RUNNING_AVERAGE_WIDTH) : mRecording.getPrevRecording(history_index).getSum(time_block->selfTime()); - LLUnits::F32Seconds full_time = self_time; + F32Seconds full_time = self_time; // reserve a spot for this bar to be rendered before its children // even though we don't know its size yet @@ -1544,7 +1544,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer LLFastTimer _(FTM_UPDATE_TIMER_BAR_FRACTIONS); TimerBar& timer_bar = row.mBars[timer_bar_index]; - const LLUnits::F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; + const F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; timer_bar.mChildrenStart = timer_bar.mSelfStart + timer_bar.mSelfTime / 2; timer_bar.mChildrenEnd = timer_bar.mChildrenStart + timer_bar.mTotalTime - timer_bar.mSelfTime; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 8f61a2fc87..d184aae03d 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -87,7 +87,7 @@ private: mFirstChild(false), mLastChild(false) {} - LLUnits::F32Seconds mTotalTime, + F32Seconds mTotalTime, mSelfTime, mChildrenStart, mChildrenEnd, @@ -113,7 +113,7 @@ private: TimerBar* mBars; }; - LLUnits::F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); + F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); S32 updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0); S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0); void setPauseState(bool pause_state); @@ -128,7 +128,7 @@ private: DISPLAY_HZ } mDisplayType; bool mPauseHistory; - LLUnits::F64Seconds mAllTimeMax, + F64Seconds mAllTimeMax, mTotalTimeDisplay; S32 mScrollIndex, mHoverBarIndex, diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index d16c2d3984..ecee801e8e 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -525,7 +525,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults(); const U32 frame_count = scene_load_recording.getNumRecordedPeriods(); - LLUnits::F64Seconds frame_time; + F64Seconds frame_time; os << "Stat"; for (S32 frame = 1; frame <= frame_count; frame++) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3a3731d519..61def8f723 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1429,7 +1429,7 @@ bool idle_startup() LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL; gFrameTime = totalTime(); - LLUnits::F32Seconds last_time = gFrameTimeSeconds; + F32Seconds last_time = gFrameTimeSeconds; gFrameTimeSeconds = (gFrameTime - gStartTime); gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0e6ef76845..07ff1de702 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -66,7 +66,7 @@ bool LLTextureFetchDebugger::sDebuggerEnabled = false; LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > LLTextureFetch::sCacheHitRate("texture_cache_hits"); -LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); +LLTrace::EventStatHandle<F64Milliseconds > LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); ////////////////////////////////////////////////////////////////////////////// @@ -2393,7 +2393,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mFetcherLocked(FALSE) { mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); - mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), LLUnits::U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold"))); + mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold"))); LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"); if(LLTextureFetchDebugger::isEnabled()) @@ -2761,7 +2761,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, discard_level = worker->mDecodedDiscard; raw = worker->mRawImage; aux = worker->mAuxImage; - LLUnits::F32Seconds cache_read_time(worker->mCacheReadTime); + F32Seconds cache_read_time(worker->mCacheReadTime); if (cache_read_time != 0.f) { record(sCacheReadLatency, cache_read_time); @@ -3372,7 +3372,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 if (log_to_viewer_log || log_to_sim) { - LLUnit<U64, LLUnits::Microseconds> timeNow = LLTimer::getTotalTime(); + U64Microseconds timeNow = LLTimer::getTotalTime(); mTextureInfo.setRequestSize(id, worker->mFileSize); mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow); } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 38272b40dc..78b13cdd80 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(LLUnit<F32, LLUnits::Kibibits> bandwidth) { mTextureBandwidth = bandwidth; } + void setTextureBandwidth(F32Kibibits bandwidth) { mTextureBandwidth = bandwidth; } // Threads: T* (but not safe) - LLUnit<F32, LLUnits::Kibibits> getTextureBandwidth() { return mTextureBandwidth; } + F32Kibibits getTextureBandwidth() { return mTextureBandwidth; } // Threads: T* BOOL isFromLocalCache(const LLUUID& id); @@ -310,7 +310,7 @@ private: LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue. static LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > sCacheHitRate; - static LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > sCacheReadLatency; + static LLTrace::EventStatHandle<F64Milliseconds > sCacheReadLatency; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; @@ -325,12 +325,12 @@ private: queue_t mHTTPTextureQueue; // Mfnq typedef std::map<LLHost,std::set<LLUUID> > cancel_queue_t; cancel_queue_t mCancelQueue; // Mfnq - LLUnit<F32, LLUnits::Kibibits> mTextureBandwidth; // <none> - LLUnit<F32, LLUnits::Kibibits> mMaxBandwidth; // Mfnq + F32Kibibits mTextureBandwidth; // <none> + F32Kibibits mMaxBandwidth; // Mfnq LLTextureInfo mTextureInfo; // XXX possible delete - LLUnit<U32, LLUnits::Bits> mHTTPTextureBits; // Mfnq + U32Bits mHTTPTextureBits; // Mfnq // XXX possible delete //debug use diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index 9dee92bf12..6906f82c1c 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -33,8 +33,8 @@ static LLTrace::CountStatHandle<S32> sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated"); static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed"); -static LLTrace::CountStatHandle<LLUnit<S32, LLUnits::Bytes> > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded"); -static LLTrace::CountStatHandle<LLUnit<U32, LLUnits::Milliseconds> > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures"); +static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded"); +static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures"); LLTextureInfo::LLTextureInfo() : mLogTextureDownloadsToViewerLog(false), @@ -46,11 +46,11 @@ LLTextureInfo::LLTextureInfo() : mRecording.start(); } -void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, LLUnit<U32, LLUnits::Bytes> textureLogThreshold) +void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold) { mLogTextureDownloadsToViewerLog = writeToViewerLog; mLogTextureDownloadsToSimulator = sendToSim; - mTextureLogThreshold = LLUnit<U32, LLUnits::Bytes>(textureLogThreshold); + mTextureLogThreshold = U32Bytes(textureLogThreshold); } LLTextureInfo::~LLTextureInfo() @@ -126,7 +126,7 @@ void LLTextureInfo::setRequestType(const LLUUID& id, LLTextureInfoDetails::LLReq mTextures[id]->mType = type; } -void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, LLUnit<U64, LLUnits::Microseconds> completeTime) +void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microseconds completeTime) { if (!has(id)) { @@ -160,7 +160,7 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, LLUnit<U64, L << " end=" << details.mCompleteTime << " size=" << details.mSize << " offset=" << details.mOffset - << " length=" << LLUnit<U32, LLUnits::Milliseconds>(details.mCompleteTime - details.mStartTime) + << " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime) << " protocol=" << protocol << LL_ENDL; } @@ -193,7 +193,7 @@ LLSD LLTextureInfo::getAverages() { LLSD averagedTextureData; S32 averageDownloadRate; - LLUnit<U32, LLUnits::Milliseconds> download_time = mRecording.getSum(sTexureDownloadTime); + U32Milliseconds download_time = mRecording.getSum(sTexureDownloadTime); if(download_time == 0) { averageDownloadRate = 0; @@ -219,11 +219,11 @@ void LLTextureInfo::resetTextureStatistics() mCurrentStatsBundleStartTime = LLTimer::getTotalTime(); } -LLUnits::U32Microseconds LLTextureInfo::getRequestStartTime(const LLUUID& id) +U32Microseconds LLTextureInfo::getRequestStartTime(const LLUUID& id) { if (!has(id)) { - return LLUnits::U32Microseconds(0); + return U32Microseconds(0); } else { @@ -232,11 +232,11 @@ LLUnits::U32Microseconds LLTextureInfo::getRequestStartTime(const LLUUID& id) } } -LLUnit<U32, LLUnits::Bytes> LLTextureInfo::getRequestSize(const LLUUID& id) +U32Bytes LLTextureInfo::getRequestSize(const LLUUID& id) { if (!has(id)) { - return LLUnits::U32Bytes(0); + return U32Bytes(0); } else { @@ -271,11 +271,11 @@ LLTextureInfoDetails::LLRequestType LLTextureInfo::getRequestType(const LLUUID& } } -LLUnit<U32, LLUnits::Microseconds> LLTextureInfo::getRequestCompleteTime(const LLUUID& id) +U32Microseconds LLTextureInfo::getRequestCompleteTime(const LLUUID& id) { if (!has(id)) { - return LLUnits::U32Microseconds(0); + return U32Microseconds(0); } else { diff --git a/indra/newview/lltextureinfo.h b/indra/newview/lltextureinfo.h index a861a12668..176f2cbb74 100755 --- a/indra/newview/lltextureinfo.h +++ b/indra/newview/lltextureinfo.h @@ -38,18 +38,18 @@ public: LLTextureInfo(); ~LLTextureInfo(); - void setUpLogging(bool writeToViewerLog, bool sendToSim, LLUnit<U32, LLUnits::Bytes> textureLogThreshold); + void setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold); bool has(const LLUUID& id); void setRequestStartTime(const LLUUID& id, U64 startTime); void setRequestSize(const LLUUID& id, U32 size); void setRequestOffset(const LLUUID& id, U32 offset); void setRequestType(const LLUUID& id, LLTextureInfoDetails::LLRequestType type); - void setRequestCompleteTimeAndLog(const LLUUID& id, LLUnit<U64, LLUnits::Microseconds> completeTime); - LLUnit<U32, LLUnits::Microseconds>getRequestStartTime(const LLUUID& id); - LLUnit<U32, LLUnits::Bytes> getRequestSize(const LLUUID& id); + void setRequestCompleteTimeAndLog(const LLUUID& id, U64Microseconds completeTime); + U32Microseconds getRequestStartTime(const LLUUID& id); + U32Bytes getRequestSize(const LLUUID& id); U32 getRequestOffset(const LLUUID& id); LLTextureInfoDetails::LLRequestType getRequestType(const LLUUID& id); - LLUnit<U32, LLUnits::Microseconds> getRequestCompleteTime(const LLUUID& id); + U32Microseconds getRequestCompleteTime(const LLUUID& id); void resetTextureStatistics(); U32 getTextureInfoMapSize(); LLSD getAverages(); @@ -62,8 +62,8 @@ private: bool mLogTextureDownloadsToViewerLog, mLogTextureDownloadsToSimulator; std::string mTextureDownloadProtocol; - LLUnit<U32, LLUnits::Bytes> mTextureLogThreshold; - LLUnit<U64, LLUnits::Microseconds> mCurrentStatsBundleStartTime; + U32Bytes mTextureLogThreshold; + U64Microseconds mCurrentStatsBundleStartTime; LLTrace::Recording mRecording; }; diff --git a/indra/newview/lltextureinfodetails.h b/indra/newview/lltextureinfodetails.h index 28e957a7df..0ad95eb94e 100755 --- a/indra/newview/lltextureinfodetails.h +++ b/indra/newview/lltextureinfodetails.h @@ -39,10 +39,10 @@ struct LLTextureInfoDetails REQUEST_TYPE_UDP }; - LLUnit<U32, LLUnits::Microseconds> mStartTime, + U32Microseconds mStartTime, mCompleteTime; U32 mOffset; - LLUnit<U32, LLUnits::Bytes> mSize; + U32Bytes mSize; LLRequestType mType; LLTextureInfoDetails(); diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c94064df5f..f39d41c2b8 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -507,17 +507,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit<S32, LLUnits::Mibibytes> bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit<S32, LLUnits::Mibibytes> max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit<S32, LLUnits::Mibibytes> total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit<S32, LLUnits::Mibibytes> max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + S32Mibibytes bound_mem = LLViewerTexture::sBoundTextureMemory; + S32Mibibytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + S32Mibibytes total_mem = LLViewerTexture::sTotalTextureMemory; + S32Mibibytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)LLUnit<F32, LLUnits::Mibibytes>(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)LLUnit<F32, LLUnits::Mibibytes>(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - LLUnit<F32, LLUnits::Bytes> total_texture_downloaded = gTotalTextureData; - LLUnit<F32, LLUnits::Bytes> total_object_downloaded = gTotalObjectData; + F32Bytes total_texture_downloaded = gTotalTextureData; + F32Bytes total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests(); U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); U32 total_objects = gObjectList.getNumObjects(); @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - LLUnit<F32, LLUnits::Kibibits> bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - LLUnit<F32, LLUnits::Kibibits> max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + F32Kibibits bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); + F32Kibibits 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.value(), max_bandwidth.value()); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index b176c69691..e009863002 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -233,7 +233,7 @@ namespace LLViewerAssetStatsFF &sDequeuedAssetRequestsOther }; - static LLTrace::EventStatHandle<LLUnits::F64Seconds > sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", + static LLTrace::EventStatHandle<F64Seconds > sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", "Time spent responding to temporary texture asset http requests"), sResponseAssetRequestsTempTextureUDP ("assetresponsetimestemptextureudp", "Time spent responding to temporary texture asset udp requests"), @@ -250,7 +250,7 @@ namespace LLViewerAssetStatsFF sResponsedAssetRequestsOther ("assetresponsetimesother", "Time spent responding to other asset requests"); - static LLTrace::EventStatHandle<LLUnits::F64Seconds >* sResponse[EVACCount] = { + static LLTrace::EventStatHandle<F64Seconds >* sResponse[EVACCount] = { &sResponseAssetRequestsTempTextureHTTP, &sResponseAssetRequestsTempTextureUDP, &sResponseAssetRequestsNonTempTextureHTTP, @@ -487,10 +487,10 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) grid_from_region_handle(it->first, &grid_x, &grid_y); r .grid_x(grid_x) .grid_y(grid_y) - .duration(LLUnit<F64, LLUnits::Microseconds>(rec.getDuration()).value()); + .duration(F64Microseconds(rec.getDuration()).value()); } - stats.duration(mCurRecording ? LLUnit<F64, LLUnits::Microseconds>(mCurRecording->getDuration()).value() : 0.0); + stats.duration(mCurRecording ? F64Microseconds(mCurRecording->getDuration()).value() : 0.0); } LLSD LLViewerAssetStats::asLLSD(bool compact_output) @@ -540,7 +540,7 @@ void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, { const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); - record(*sResponse[int(eac)], LLUnit<F64, LLUnits::Microseconds>(duration)); + record(*sResponse[int(eac)], F64Microseconds(duration)); } void init() diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index a42060d4d8..aaa299bf4b 100755 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -82,7 +82,7 @@ public: * for compatibility with the pre-existing timestamp on the texture * fetcher class, LLTextureFetch. */ - typedef LLUnit<U64, LLUnits::Microseconds> duration_t; + typedef U64Microseconds duration_t; /** * Type for the region identifier used in stats. Currently uses diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f12df23a36..6c435bf147 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4487,18 +4487,18 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) // *TODO: Remove this dependency, or figure out a better way to handle // this hack. -extern LLUnit<U32, LLUnits::Bits> gObjectData; +extern U32Bits gObjectData; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4510,11 +4510,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4526,11 +4526,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4542,11 +4542,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ { if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit<U32, LLUnits::Bytes>)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index a8183e76b4..4643430c6b 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -995,13 +995,13 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // update global timer F32 last_time = gFrameTimeSeconds; - LLUnit<U64, LLUnits::Microseconds> time = totalTime(); // this will become the new gFrameTime when the update is done + U64Microseconds time = totalTime(); // this will become the new gFrameTime when the update is done // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - LLUnits::F64Seconds time_diff = time - gFrameTime; + F64Seconds time_diff = time - gFrameTime; gFrameTime = time; - LLUnits::F64Seconds time_since_start = gFrameTime - gStartTime; + F64Seconds time_since_start = gFrameTime - gStartTime; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 568d4b42ca..67005e1978 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -95,7 +95,7 @@ LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat"); -LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> > +LLTrace::CountStatHandle<F64Kibibytes > 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"), @@ -104,7 +104,7 @@ LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> > MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"), MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data"); -LLTrace::CountStatHandle<LLUnits::F64Seconds > +LLTrace::CountStatHandle<F64Seconds > 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%"); @@ -152,15 +152,15 @@ LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > static LLTrace::SampleStatHandle<bool> CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"); -LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Megabytes> > GL_TEX_MEM("gltexmemstat"), +LLTrace::SampleStatHandle<F64Megabytes > GL_TEX_MEM("gltexmemstat"), GL_BOUND_MEM("glboundmemstat"), RAW_MEM("rawmemstat"), FORMATTED_MEM("formattedmemstat"); -LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Kibibytes> > DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), +LLTrace::SampleStatHandle<F64Kibibytes > DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting"); -SimMeasurement<LLUnit<F64, LLUnits::Milliseconds> > SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS), +SimMeasurement<F64Milliseconds > 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), @@ -175,10 +175,10 @@ SimMeasurement<LLUnit<F64, LLUnits::Milliseconds> > SIM_FRAME_TIME("simframemsec SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME), SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME); -SimMeasurement<LLUnit<F64, LLUnits::Kilobytes> > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES); -SimMeasurement<LLUnit<F64, LLUnits::Megabytes> > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); +SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES); +SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); -LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Milliseconds> > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), +LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), SIM_PING("simpingstat"); @@ -186,7 +186,7 @@ LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP("age LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY("loadingwearableslongdelay", "Wearables took too long to load"); -LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"), +LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"), FRAME_STACKTIME("framestacktime", "FRAME_SECS"), UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"), NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"), @@ -194,7 +194,7 @@ LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > REGION_CROSSING_TI REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"), RENDER_STACKTIME("renderstacktime", "RENDER_SECS"); -LLTrace::EventStatHandle<LLUnits::F64Seconds > AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), +LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"), MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"), FPS_10_TIME("fps10time", "Seconds below 10 FPS"), @@ -219,7 +219,7 @@ void LLViewerStats::resetStats() LLViewerStats::instance().mRecording.reset(); } -void LLViewerStats::updateFrameStats(const LLUnits::F64Seconds time_diff) +void LLViewerStats::updateFrameStats(const F64Seconds time_diff) { if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) { @@ -258,15 +258,15 @@ void LLViewerStats::updateFrameStats(const LLUnits::F64Seconds time_diff) add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); // old stats that were never really used - sample(LLStatViewer::FRAMETIME_JITTER, LLUnit<F64, LLUnits::Milliseconds> (mLastTimeDiff - time_diff)); + sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff)); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - sample(LLStatViewer::FRAMETIME_SLEW, LLUnit<F64, LLUnits::Milliseconds> (average_frametime - time_diff)); + sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff)); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - sample(LLStatViewer::DELTA_BANDWIDTH, LLUnit<F64, LLUnits::Bits>(delta_bandwidth)); - sample(LLStatViewer::MAX_BANDWIDTH, LLUnit<F64, LLUnits::Bits>(max_bandwidth)); + sample(LLStatViewer::DELTA_BANDWIDTH, F64Bits(delta_bandwidth)); + sample(LLStatViewer::MAX_BANDWIDTH, F64Bits(max_bandwidth)); } mLastTimeDiff = time_diff; @@ -299,13 +299,13 @@ F32 gAveLandCompression = 0.f, gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f; -LLUnits::U32Bytes gTotalWorldData, +U32Bytes gTotalWorldData, gTotalObjectData, gTotalTextureData; U32 gSimPingCount = 0; -LLUnits::U32Bits gObjectData; +U32Bits gObjectData; F32 gAvgSimPing = 0.f; -LLUnits::U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {LLUnits::U32Bytes(0)}; +U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)}; extern U32 gVisCompared; extern U32 gVisTested; @@ -345,8 +345,8 @@ void update_statistics() typedef LLInstanceTracker<LLTrace::TraceType<LLTrace::TimeBlockAccumulator>, std::string> trace_type_t; - LLUnits::F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); - LLUnits::F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); + F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); + F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame"))); record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs); @@ -358,13 +358,13 @@ void update_statistics() LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - sample(LLStatViewer::SIM_PING, LLUnit<F64, LLUnits::Milliseconds> (cdp->getPingDelay())); + sample(LLStatViewer::SIM_PING, F64Milliseconds (cdp->getPingDelay())); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - sample(LLStatViewer::SIM_PING, LLUnits::U32Seconds(10)); + sample(LLStatViewer::SIM_PING, U32Seconds(10)); } if (LLViewerStats::instance().getRecording().getSum(LLStatViewer::FPS)) @@ -374,10 +374,10 @@ void update_statistics() add(LLStatViewer::FPS, 1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bits>(layer_bits)); + add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, F64Bits(layer_bits)); add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData); sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending()); - add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, LLUnit<F64, LLUnits::Bits>(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); + add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, F64Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) @@ -553,9 +553,9 @@ void send_stats() LLSD &download = body["downloads"]; - download["world_kbytes"] = LLUnit<F64, LLUnits::Kibibytes>(gTotalWorldData).value(); - download["object_kbytes"] = LLUnit<F64, LLUnits::Kibibytes>(gTotalObjectData).value(); - download["texture_kbytes"] = LLUnit<F64, LLUnits::Kibibytes>(gTotalTextureData).value(); + download["world_kbytes"] = F64Kibibytes(gTotalWorldData).value(); + download["object_kbytes"] = F64Kibibytes(gTotalObjectData).value(); + download["texture_kbytes"] = F64Kibibytes(gTotalTextureData).value(); download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0; LLSD &in = body["stats"]["net"]["in"]; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 2cea575252..42c56e8835 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -142,7 +142,7 @@ extern LLTrace::CountStatHandle<> FPS, extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > TRIANGLES_DRAWN; -extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> > ACTIVE_MESSAGE_DATA_RECEIVED, +extern LLTrace::CountStatHandle<F64Kibibytes > ACTIVE_MESSAGE_DATA_RECEIVED, LAYERS_NETWORK_DATA_RECEIVED, OBJECT_NETWORK_DATA_RECEIVED, ASSET_UDP_DATA_RECEIVED, @@ -150,7 +150,7 @@ extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> > ACTIVE_MESSAGE MESSAGE_SYSTEM_DATA_IN, MESSAGE_SYSTEM_DATA_OUT; -extern LLTrace::CountStatHandle<LLUnits::F64Seconds > SIM_20_FPS_TIME, +extern LLTrace::CountStatHandle<F64Seconds > SIM_20_FPS_TIME, SIM_PHYSICS_20_FPS_TIME, LOSS_5_PERCENT_TIME; @@ -192,13 +192,13 @@ extern LLTrace::SampleStatHandle<> FPS_SAMPLE, extern LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > PACKETS_LOST_PERCENT; -extern LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Megabytes> > GL_TEX_MEM, +extern LLTrace::SampleStatHandle<F64Megabytes > GL_TEX_MEM, GL_BOUND_MEM, RAW_MEM, FORMATTED_MEM; -extern LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Kibibytes> > DELTA_BANDWIDTH, +extern LLTrace::SampleStatHandle<F64Kibibytes > DELTA_BANDWIDTH, MAX_BANDWIDTH; -extern SimMeasurement<LLUnit<F64, LLUnits::Milliseconds> > SIM_FRAME_TIME, +extern SimMeasurement<F64Milliseconds > SIM_FRAME_TIME, SIM_NET_TIME, SIM_OTHER_TIME, SIM_PHYSICS_TIME, @@ -213,11 +213,11 @@ extern SimMeasurement<LLUnit<F64, LLUnits::Milliseconds> > SIM_FRAME_TIME, SIM_SLEEP_TIME, SIM_PUMP_IO_TIME; -extern SimMeasurement<LLUnit<F64, LLUnits::Kilobytes> > SIM_UNACKED_BYTES; -extern SimMeasurement<LLUnit<F64, LLUnits::Megabytes> > SIM_PHYSICS_MEM; +extern SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES; +extern SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM; -extern LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Milliseconds> > FRAMETIME_JITTER, +extern LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER, FRAMETIME_SLEW, SIM_PING; @@ -225,7 +225,7 @@ extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SN extern LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY; -extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > REGION_CROSSING_TIME, +extern LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME, FRAME_STACKTIME, UPDATE_STACKTIME, NETWORK_STACKTIME, @@ -233,7 +233,7 @@ extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Milliseconds> > REGION_CROS REBUILD_STACKTIME, RENDER_STACKTIME; -extern LLTrace::EventStatHandle<LLUnits::F64Seconds > AVATAR_EDIT_TIME, +extern LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME, TOOLBOX_TIME, MOUSELOOK_TIME, FPS_10_TIME, @@ -254,7 +254,7 @@ public: LLViewerStats(); ~LLViewerStats(); - void updateFrameStats(const LLUnits::F64Seconds time_diff); + void updateFrameStats(const F64Seconds time_diff); void addToMessage(LLSD &body); @@ -370,7 +370,7 @@ public: private: LLTrace::Recording mRecording; - LLUnits::F64Seconds mLastTimeDiff; // used for time stat updates + F64Seconds mLastTimeDiff; // used for time stat updates }; static const F32 SEND_STATS_PERIOD = 300.0f; @@ -380,7 +380,7 @@ void update_statistics(); void send_stats(); extern LLFrameTimer gTextureTimer; -extern LLUnit<U32, LLUnits::Bytes> gTotalTextureData; -extern LLUnit<U32, LLUnits::Bytes> gTotalObjectData; -extern LLUnit<U32, LLUnits::Bytes> gTotalTextureBytesPerBoostLevel[] ; +extern U32Bytes gTotalTextureData; +extern U32Bytes gTotalObjectData; +extern U32Bytes gTotalTextureBytesPerBoostLevel[] ; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c780814e50..4290d338c1 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,8 +63,8 @@ /////////////////////////////////////////////////////////////////////////////// // extern -const LLUnit<S32, LLUnits::Mibibytes> gMinVideoRam(32); -const LLUnit<S32, LLUnits::Mibibytes> gMaxVideoRam(512); +const S32Mibibytes gMinVideoRam(32); +const S32Mibibytes gMaxVideoRam(512); // statics @@ -86,11 +86,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sBoundTextureMemory; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sTotalTextureMemory; -LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxBoundTextureMem; -LLUnit<S32, LLUnits::Mibibytes> LLViewerTexture::sMaxTotalTextureMem; -LLUnit<S32, LLUnits::Bytes> LLViewerTexture::sMaxDesiredTextureMem; +S32Bytes LLViewerTexture::sBoundTextureMemory; +S32Bytes LLViewerTexture::sTotalTextureMemory; +S32Mibibytes LLViewerTexture::sMaxBoundTextureMem; +S32Mibibytes LLViewerTexture::sMaxTotalTextureMem; +S32Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -540,7 +540,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<S32, LLUnits::Bytes>(gMaxVideoRam)); + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, S32Bytes(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b0eae7c071..9a00ccd8c6 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -38,8 +38,8 @@ #include <map> #include <list> -extern const LLUnit<S32, LLUnits::Mibibytes> gMinVideoRam; -extern const LLUnit<S32, LLUnits::Mibibytes> gMaxVideoRam; +extern const S32Mibibytes gMinVideoRam; +extern const S32Mibibytes gMaxVideoRam; class LLImageGL ; class LLImageRaw; @@ -205,11 +205,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - static LLUnit<S32, LLUnits::Bytes> sBoundTextureMemory; - static LLUnit<S32, LLUnits::Bytes> sTotalTextureMemory; - static LLUnit<S32, LLUnits::Mibibytes> sMaxBoundTextureMem; - static LLUnit<S32, LLUnits::Mibibytes> sMaxTotalTextureMem; - static LLUnit<S32, LLUnits::Bytes> sMaxDesiredTextureMem ; + static S32Bytes sBoundTextureMemory; + static S32Bytes sTotalTextureMemory; + static S32Mibibytes sMaxBoundTextureMem; + static S32Mibibytes sMaxTotalTextureMem; + static S32Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2030b490e4..888174a6cf 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -670,8 +670,8 @@ void LLViewerTextureList::updateImages(F32 max_time) sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); - sample(RAW_MEM, LLUnit<F64, LLUnits::Bytes>(LLImageRaw::sGlobalRawMemory)); - sample(FORMATTED_MEM, LLUnit<F64, LLUnits::Bytes>(LLImageFormatted::sGlobalFormattedMemory)); + sample(RAW_MEM, F64Bytes(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, F64Bytes(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1373,7 +1373,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bytes>(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1447,7 +1447,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bytes>(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 673b55be69..53bda6e6ab 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -101,8 +101,8 @@ public: void setUpdateStats(BOOL b) { mUpdateStats = b; } - LLUnit<S32, LLUnits::Mibibytes> getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } - LLUnit<S32, LLUnits::Mibibytes> getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} + S32Mibibytes getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } + S32Mibibytes getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} S32 getNumImages() { return mImageList.size(); } void updateMaxResidentTexMem(S32 mem); @@ -200,8 +200,8 @@ private: BOOL mInitialized ; BOOL mUpdateStats; - LLUnit<S32, LLUnits::Mibibytes> mMaxResidentTexMemInMegaBytes; - LLUnit<S32, LLUnits::Mibibytes> mMaxTotalTextureMemInMegaBytes; + S32Mibibytes mMaxResidentTexMemInMegaBytes; + S32Mibibytes mMaxTotalTextureMemInMegaBytes; LLFrameTimer mForceDecodeTimer; private: diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 12d58b7521..1e60b59932 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -738,7 +738,7 @@ public: { if(gTotalTextureBytesPerBoostLevel[i] > 0) { - addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit<F32, LLUnits::Mibibytes>(gTotalTextureBytesPerBoostLevel[i]).value())); + addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, F32Mibibytes(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 66206fe53e..db6d2d6fe9 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -899,7 +899,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - LLUnits::F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); + F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 31b7e5a01c..93351d21f5 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6547,7 +6547,7 @@ void LLVivoxVoiceClient::expireVoiceFonts() // Give a warning notification if any voice fonts are due to expire. if (will_expire) { - LLUnit<S32, LLUnits::Seconds> seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); + S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value()); LLNotificationsUtil::add("VoiceEffectsWillExpire", args); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 38818e242b..9d727dafbe 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -717,7 +717,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - LLUnits::F64Bits bits; + F64Bits bits; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -735,8 +735,8 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - LLUnit<F64, LLUnits::Bits> actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); - LLUnit<F64, LLUnits::Bits> actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); + F64Bits actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); + F64Bits actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); |