@@ -853,12 +853,31 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
853
853
else if (strcmp (Command, " summary" ) == 0 )
854
854
{
855
855
856
+ POSITION pos;
857
+ CString strName;
858
+ CTrigger * pTrigger;
859
+ CAlias * pAlias;
860
+ CTimer * pTimer;
861
+ CPlugin * pPlugin;
862
+
863
+ __int64 nTotalMatches = 0 ;
864
+ __int64 nTotalMatchAttempts = 0 ;
865
+ long nTotal = 0 ;
866
+ long nEnabled = 0 ;
867
+ long nRegexp = 0 ;
868
+ LONGLONG iTimeTaken = 0 ;
869
+ double elapsed_time;
870
+ int i;
871
+
872
+
856
873
Note (" " );
857
874
Note (" -------------- MUSHclient summary --------------" );
858
875
Note (" " );
859
876
Note (TFormat (" MUSHclient version: %s" , MUSHCLIENT_VERSION));
860
877
// show compilation date
861
878
Note (TFormat (" Compiled: %s." , __DATE__));
879
+ Note (CTime::GetCurrentTime ().Format (TranslateTime (" Time now: %A, %B %d, %Y, %#I:%M %p" )));
880
+
862
881
863
882
OSVERSIONINFO ver;
864
883
// see which OS we are using
@@ -920,6 +939,11 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
920
939
Note (TFormat (" World name: '%s', ID: %s" ,
921
940
(LPCTSTR) m_mush_name, (LPCTSTR) m_strWorldID));
922
941
942
+ CString strStatus = GetConnectionStatus (m_iConnectPhase);
943
+
944
+ Note (TFormat (" Connect phase: %i (%s)" ,
945
+ m_iConnectPhase, (LPCTSTR) strStatus));
946
+
923
947
// scripting info
924
948
925
949
Note (TFormat (" Script language: %s, enabled: %s" ,
@@ -932,24 +956,15 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
932
956
(LPCTSTR) m_strScriptFilename
933
957
));
934
958
935
- // count triggers, aliases, timers
936
-
937
- POSITION pos;
938
- CString strName;
939
- CTrigger * pTrigger;
940
- CAlias * pAlias;
941
- CTimer * pTimer;
942
- CPlugin * pPlugin;
943
-
944
- __int64 nTotalMatches = 0 ;
945
- __int64 nTotalMatchAttempts = 0 ;
946
- long nTotal = 0 ;
947
- long nEnabled = 0 ;
948
- long nRegexp = 0 ;
949
- LONGLONG iTimeTaken = 0 ;
950
- double elapsed_time;
959
+ // time taken to execute scripts
960
+ if (App.m_iCounterFrequency > 0 )
961
+ {
962
+ elapsed_time = ((double ) m_iScriptTimeTaken) /
963
+ ((double ) App.m_iCounterFrequency );
964
+ Note (TFormat (" Scripting for: %1.6f seconds." , elapsed_time));
965
+ }
951
966
952
-
967
+
953
968
// count number of triggers matched
954
969
for (pos = m_TriggerMap.GetStartPosition (); pos; )
955
970
{
@@ -1076,11 +1091,18 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1076
1091
Note (TFormat (" ** Variables: %ld." , nTotal));
1077
1092
1078
1093
if (m_bCompress)
1094
+ {
1079
1095
Note (TFormat (" MCCP active, took %1.6f seconds to decompress" , elapsed_time));
1096
+ Note (TFormat (" MCCP received %I64d compressed bytes, decompressed to %I64d bytes." , m_nTotalCompressed, m_nTotalUncompressed));
1097
+ if (m_nTotalUncompressed)
1098
+ {
1099
+ double fRatio = (double ) m_nTotalCompressed / (double ) m_nTotalUncompressed * 100.0 ;
1100
+ Note (TFormat (" MCCP compression ratio was: %6.1f%% (lower is better)" , fRatio ));
1101
+ }
1102
+ }
1080
1103
else
1081
1104
Note (Translate (" MCCP not active." ));
1082
1105
1083
-
1084
1106
// count and display plugins
1085
1107
1086
1108
nTotal = 0 ;
@@ -1110,13 +1132,16 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1110
1132
__int64 nOutK = m_nBytesOut / (__int64) 1024 ;
1111
1133
Note (TFormat (" Received: %I64d bytes (%I64d Kb)" , m_nBytesIn, nInK));
1112
1134
Note (TFormat (" Sent: %I64d bytes (%I64d Kb)" , m_nBytesOut, nOutK));
1135
+ Note (TFormat (" Received %I64d packets, sent %I64d packets." , m_iInputPacketCount, m_iOutputPacketCount));
1113
1136
1114
1137
Note (TFormat (" Output buffer: %i of %ld lines." ,
1115
1138
m_LineList.GetCount (),
1116
1139
m_maxlines));
1117
1140
1118
1141
Note (TFormat (" Total lines received: %ld" , m_total_lines));
1119
1142
1143
+ Note (TFormat (" This connection: Sent %ld lines, received %ld lines." , m_nTotalLinesSent, m_nTotalLinesReceived));
1144
+
1120
1145
// MXP
1121
1146
1122
1147
Note (TFormat (" MXP active: %s, Pueblo mode: %s" ,
@@ -1224,14 +1249,33 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1224
1249
1225
1250
// telnet negotiation
1226
1251
1227
- Note (TFormat (" ** Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld" ,
1252
+ Note (TFormat (" Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld" ,
1228
1253
m_nCount_IAC_DO,
1229
1254
m_nCount_IAC_DONT,
1230
1255
m_nCount_IAC_WILL,
1231
1256
m_nCount_IAC_WONT,
1232
1257
m_nCount_IAC_SB));
1233
1258
1234
1259
1260
+ // logging?
1261
+
1262
+ Note (TFormat (" Logging: %s, tracing: %s" ,
1263
+ SHOW_TRUE (m_logfile), SHOW_TRUE (m_bTrace) ));
1264
+
1265
+ // databases?
1266
+ Note (TFormat (" SQLite3 databases: %i" , m_Databases.size ()));
1267
+
1268
+ // sound buffers?
1269
+
1270
+ nTotal = 0 ;
1271
+
1272
+ for (i = 0 ; i < MAX_SOUND_BUFFERS; i++)
1273
+ if (m_pDirectSoundSecondaryBuffer [i])
1274
+ nTotal++;
1275
+
1276
+ Note (TFormat (" DirectSound buffers in use: %ld" , nTotal));
1277
+
1278
+
1235
1279
// end summary
1236
1280
1237
1281
Note (" " );
0 commit comments