Less overshoot in HTTP bandwidth graph for higher values.

This commit is contained in:
Aleric Inglewood
2013-04-29 16:21:46 +02:00
parent 1d2b3d3dc9
commit 19e16240d4

View File

@@ -247,7 +247,8 @@ void LLFloaterStats::buildStats()
stat_barp = net_statviewp->addStat("HTTP Textures", &(LLViewerStats::getInstance()->mHTTPTextureKBitStat), "DebugStatModeHTTPTexture");
stat_barp->setUnitLabel(" kbps");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = gSavedSettings.getF32("HTTPThrottleBandwidth") * 2; // Times two because we'll have over shoots.
stat_barp->mMaxBar = gSavedSettings.getF32("HTTPThrottleBandwidth");
stat_barp->mMaxBar *= llclamp(2.0 - (stat_barp->mMaxBar - 400.f) / 3600.f, 1.0, 2.0); // Allow for overshoot (allow more for low bandwidth values).
stat_barp->mTickSpacing = 1.f;
while (stat_barp->mTickSpacing < stat_barp->mMaxBar / 8)
stat_barp->mTickSpacing *= 2.f;