diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloaterlagmeter.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterlagmeter.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloaterlagmeter.cpp b/linden/indra/newview/llfloaterlagmeter.cpp index 2367c4d..91471ca 100644 --- a/linden/indra/newview/llfloaterlagmeter.cpp +++ b/linden/indra/newview/llfloaterlagmeter.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -99,19 +100,15 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) | |||
99 | mMinWidth = atoi( config_string.c_str() ); | 100 | mMinWidth = atoi( config_string.c_str() ); |
100 | 101 | ||
101 | mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps"); | 102 | mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps"); |
102 | mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps"); | ||
103 | mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps"); | 103 | mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps"); |
104 | 104 | ||
105 | mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct"); | 105 | mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct"); |
106 | mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct"); | ||
107 | mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct"); | 106 | mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct"); |
108 | 107 | ||
109 | mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms"); | 108 | mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms"); |
110 | mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms"); | ||
111 | mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms"); | 109 | mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms"); |
112 | 110 | ||
113 | mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); | 111 | mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); |
114 | mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps"); | ||
115 | mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); | 112 | mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); |
116 | 113 | ||
117 | childSetAction("minimize", onClickShrink, this); | 114 | childSetAction("minimize", onClickShrink, this); |
@@ -201,6 +198,12 @@ void LLFloaterLagMeter::determineNetwork() | |||
201 | bool find_cause_loss = false; | 198 | bool find_cause_loss = false; |
202 | bool find_cause_ping = false; | 199 | bool find_cause_ping = false; |
203 | 200 | ||
201 | // *FIXME: We can't blame a large ping time on anything in | ||
202 | // particular if the frame rate is low, because a low frame | ||
203 | // rate is a sure recipe for crappy ping times right now until | ||
204 | // the network handlers are de-synched from the rendering. | ||
205 | F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration(); | ||
206 | |||
204 | if(packet_loss >= mNetworkPacketLossCritical) | 207 | if(packet_loss >= mNetworkPacketLossCritical) |
205 | { | 208 | { |
206 | mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); | 209 | mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); |
@@ -210,8 +213,11 @@ void LLFloaterLagMeter::determineNetwork() | |||
210 | else if(ping_time >= mNetworkPingCritical) | 213 | else if(ping_time >= mNetworkPingCritical) |
211 | { | 214 | { |
212 | mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); | 215 | mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); |
213 | mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) ); | 216 | if (client_frame_time_ms < mNetworkPingCritical) |
214 | find_cause_ping = true; | 217 | { |
218 | mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) ); | ||
219 | find_cause_ping = true; | ||
220 | } | ||
215 | } | 221 | } |
216 | else if(packet_loss >= mNetworkPacketLossWarning) | 222 | else if(packet_loss >= mNetworkPacketLossWarning) |
217 | { | 223 | { |
@@ -222,8 +228,11 @@ void LLFloaterLagMeter::determineNetwork() | |||
222 | else if(ping_time >= mNetworkPingWarning) | 228 | else if(ping_time >= mNetworkPingWarning) |
223 | { | 229 | { |
224 | mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); | 230 | mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); |
225 | mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) ); | 231 | if (client_frame_time_ms < mNetworkPingWarning) |
226 | find_cause_ping = true; | 232 | { |
233 | mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) ); | ||
234 | find_cause_ping = true; | ||
235 | } | ||
227 | } | 236 | } |
228 | else | 237 | else |
229 | { | 238 | { |