PHOE-3773: Show script time in ms, added debug option to show in microseconds (PhoenixScriptTimeMicroseconds)

Tue, 06 Mar 2012 20:08:03 -0800

author
Kadah_Coba <kadah.coba@gmail.com>
date
Tue, 06 Mar 2012 20:08:03 -0800
changeset 1665
35bd4c2173eb
parent 1664
f9cd471c38bf
child 1666
e55f036c87e0

PHOE-3773: Show script time in ms, added debug option to show in microseconds (PhoenixScriptTimeMicroseconds)

indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/scriptcounter.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/app_settings/settings.xml	Tue Mar 06 18:24:10 2012 -0800
     1.2 +++ b/indra/newview/app_settings/settings.xml	Tue Mar 06 20:08:03 2012 -0800
     1.3 @@ -9994,6 +9994,17 @@
     1.4  				<integer>51</integer>
     1.5  			</array>
     1.6  		</map>
     1.7 +		<key>PhoenixScriptTimeMicroseconds</key>
     1.8 +		<map>
     1.9 +			<key>Comment</key>
    1.10 +			<string>Show get obejct/avatar script time in microseconds.</string>
    1.11 +			<key>Persist</key>
    1.12 +			<integer>1</integer>
    1.13 +			<key>Type</key>
    1.14 +			<string>Boolean</string>
    1.15 +			<key>Value</key>
    1.16 +			<integer>0</integer>
    1.17 +		</map>
    1.18  		<key>PhoenixShowChatChannel</key>
    1.19  		<map>
    1.20  			<key>Comment</key>
     2.1 --- a/indra/newview/scriptcounter.cpp	Tue Mar 06 18:24:10 2012 -0800
     2.2 +++ b/indra/newview/scriptcounter.cpp	Tue Mar 06 20:08:03 2012 -0800
     2.3 @@ -116,7 +116,11 @@
     2.4      resultStr+=" [";
     2.5      resultStr+=sstr.str();
     2.6      resultStr+="K]";
     2.7 -    resultStr+=llformat(" [%.2f ┬ÁSeconds]", scriptTime);
     2.8 +    resultStr+=llformat(" [%.3f ms]", scriptTime/1000);
     2.9 +    if (gSavedSettings.getBOOL("PhoenixScriptTimeMicroseconds"))
    2.10 +    {
    2.11 +        resultStr+=llformat(" [%.2f ┬ÁSeconds]", scriptTime);
    2.12 +    }
    2.13      cmdline_printchat(resultStr);
    2.14      init();
    2.15    }

mercurial