Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
6.8 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: statdef.h
  6. * Content: Definition of stat structures for voice instrumentation
  7. *
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 02/17/2000 rodtoll Created it
  12. ***************************************************************************/
  13. #ifndef __STATDEF_H
  14. #define __STATDEF_H
  15. #define MAX_MIXING_THREADS 16
  16. #define MIXING_HISTORY 20
  17. struct ServerStats
  18. {
  19. DVSESSIONDESC m_dvSessionDesc;
  20. DWORD m_dwBufferDescAllocated;
  21. DWORD m_dwBufferDescOustanding;
  22. DWORD m_dwPacketsAllocated[3];
  23. DWORD m_dwPacketsOutstanding[3];
  24. };
  25. struct MixingServerStats
  26. {
  27. LONG m_dwNumMixingThreads; // # of mixing threads on this server
  28. LONG m_dwNumMixingThreadsActive;
  29. // # of mixing threads currently active
  30. LONG m_dwPreMixingPassTimeHistoryLoc;
  31. LONG m_dwPreMixingPassTimeHistory[MIXING_HISTORY];
  32. LONG m_dwMaxMixingThreadsActive;
  33. // Maximum # of mixing threads running at once
  34. LONG m_dwNumMixingPasses; // # of times the mixing server has run
  35. LONG m_dwNumMixingPassesPerThread[MAX_MIXING_THREADS];
  36. // # of times each thread has been run
  37. LONG m_dwCurrentMixingHistoryLoc[MAX_MIXING_THREADS];
  38. LONG m_dwMixingPassesTimeHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  39. // # of ms each thread took during it's last 20 runs
  40. LONG m_lCurrentPlayerCount[MAX_MIXING_THREADS][MIXING_HISTORY];
  41. LONG m_lCurrentDupTimeHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  42. LONG m_lCurrentDecTimeHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  43. LONG m_lCurrentMixTimeHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  44. LONG m_lCurrentRetTimeHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  45. LONG m_lCurrentDecCountHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  46. LONG m_lCurrentMixCountTotalHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  47. LONG m_lCurrentMixCountFwdHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  48. LONG m_lCurrentMixCountReuseHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  49. LONG m_lCurrentMixCountOriginalHistory[MAX_MIXING_THREADS][MIXING_HISTORY];
  50. };
  51. // ReceiveStats
  52. //
  53. // Statistics for receive
  54. //
  55. struct ReceiveStats
  56. {
  57. DWORD m_dwNumPackets;
  58. DWORD m_dwNumBytes;
  59. DWORD m_dwReceiveErrors;
  60. };
  61. // RecordStats
  62. //
  63. // Statistics for recording buffers
  64. //
  65. struct RecordStats
  66. {
  67. DWORD m_dwNumWakeups; // # of wakeup
  68. DWORD m_dwRPWMax; // Runs / wakeup Max
  69. DWORD m_dwRPWMin; // Runs / wakeup Min
  70. DWORD m_dwRPWTotal; // Runs / wakeup total
  71. DWORD m_dwNumMessages; // # of messages sent
  72. DWORD m_dwRRMax; // # of record resets Max
  73. DWORD m_dwRRMin; // # of record resets Min
  74. DWORD m_dwRRTotal; // # of record resets Total
  75. DWORD m_dwRTSLMMax; // # of ms since last movement (Max)
  76. DWORD m_dwRTSLMMin; // # of ms since last movement (Min)
  77. DWORD m_dwRTSLMTotal; // # of ms since last movement (Total)
  78. DWORD m_dwRMMSMax; // Record movemenet (ms) Max
  79. DWORD m_dwRMMSMin; // Record movement (ms) Min
  80. DWORD m_dwRMMSTotal; // Record movement (ms) Total
  81. DWORD m_dwRMBMax; // Record movement (bytes) Max
  82. DWORD m_dwRMBMin; // Record movement (bytes) Min
  83. DWORD m_dwRMBTotal; // Record movement (bytes) Total
  84. DWORD m_dwRLMax; // Record lag (bytes) Max
  85. DWORD m_dwRLMin; // Record lag (bytes) Min
  86. DWORD m_dwRLTotal; // Record lag (bytes) Total
  87. DWORD m_dwHSTotal; // Size of header (bytes) Total
  88. DWORD m_dwHSMax; // Size of header (bytes) Max
  89. DWORD m_dwHSMin; // Size of header (bytes) Min
  90. DWORD m_dwSentFrames; // # of frames sent
  91. DWORD m_dwIgnoredFrames; // # of frames ignored
  92. DWORD m_dwCSMin; // Min Size (bytes) compressed frame
  93. DWORD m_dwCSMax; // Max size (bytes) compressed frame
  94. DWORD m_dwCSTotal; // Total size (bytes) of compressed data
  95. DWORD m_dwUnCompressedSize; // Size of a frame uncompressed
  96. DWORD m_dwFramesPerBuffer; // # of frames per buffer
  97. DWORD m_dwFrameTime; // Time for a frame
  98. DWORD m_dwSilenceTimeout; // Silence timeout
  99. DWORD m_dwTimeStart; // Time subsystem started
  100. DWORD m_dwTimeStop; // Time subsystem stopped
  101. DWORD m_dwStartLag; // Lag between Rec & SubSys Start
  102. DWORD m_dwMLMax; // Message length max
  103. DWORD m_dwMLMin; // Message length (min)
  104. DWORD m_dwMLTotal; // Message length (total)
  105. DWORD m_dwCTMax; // Time to compress a frame (Max)
  106. DWORD m_dwCTMin; // Time to compress a frame (Min)
  107. DWORD m_dwCTTotal; // Time to compress a frame (Total)
  108. };
  109. // PlaybackStats
  110. //
  111. // Statistics used to track statistics for playback buffers
  112. //
  113. struct PlaybackStats
  114. {
  115. DWORD m_dwNumRuns; // # of runs this buffer had
  116. DWORD m_dwPMMSMax; // Play movement (ms) Max
  117. DWORD m_dwPMMSMin; // Play movement (ms) Min
  118. DWORD m_dwPMMSTotal; // Play movement (ms) Total
  119. DWORD m_dwPMBMax; // Play movement (bytes) Max
  120. DWORD m_dwPMBMin; // Play movement (bytes) Min
  121. DWORD m_dwPMBTotal; // Play movement (bytes) Total
  122. DWORD m_dwPLMax; // Play lead (bytes) Max
  123. DWORD m_dwPLMin; // Play lead (bytes) Min
  124. DWORD m_dwPLTotal; // Play lead (bytes) Total
  125. DWORD m_dwPPunts; // # of times pointer punted
  126. DWORD m_dwPIgnore; // # of ignored frames for wraparound
  127. DWORD m_dwNumMixed; // # of frames which were mixed
  128. DWORD m_dwNumSilentMixed; // # of frames mixed which were silence
  129. DWORD m_dwTimeStart; // GetTickCount at buffer playback
  130. DWORD m_dwTimeStop; // GetTickCount at buffer Stop
  131. DWORD m_dwStartLag; // Lag between play & subsys start
  132. DWORD m_dwNumBL; // # of lost buffer / restores
  133. DWORD m_dwGlitches; // # of glitches during playback
  134. DWORD m_dwSIgnore; // # of times ignored frame on silence write
  135. DWORD m_dwFrameSize; // Size of frame in bytes
  136. DWORD m_dwBufferSize; // Size of buffer
  137. };
  138. // TransmitSTats
  139. //
  140. // Statistics for transmission
  141. //
  142. struct TransmitStats
  143. {
  144. DWORD m_dwNumPackets;
  145. DWORD m_dwNumBytes;
  146. DWORD m_dwTransmitErrors;
  147. };
  148. struct ClientStatistics
  149. {
  150. RecordStats m_recStats;
  151. PlaybackStats m_playStats;
  152. ReceiveStats m_recvStats;
  153. TransmitStats m_tranStats;
  154. DWORD m_dwMaxBuffers; // Max # of playback buffers
  155. DWORD m_dwTotalBuffers; // Total # of playback buffers
  156. DWORD m_dwTimeStart; // GetTickCount when connect accepted
  157. DWORD m_dwTimeStop; // GetTickCount when cleanup completed
  158. DWORD m_dwPPDQSilent; // # of silent frames dequeued
  159. DWORD m_dwPPDQLost; // # of lost frames dequeued
  160. DWORD m_dwPPDQSpeech; // # of Speech frames dequeued
  161. DWORD m_dwPDTMax; // ms for decompress (max)
  162. DWORD m_dwPDTMin; // ms for decompress (min)
  163. DWORD m_dwPDTTotal; // ms for decompress (total)
  164. DWORD m_dwPRESpeech; // # of packets enqueued
  165. DWORD m_dwBDPOutstanding;
  166. DWORD m_dwBDPAllocated;
  167. DWORD m_dwBPOutstanding[3];
  168. DWORD m_dwBPAllocated[3];
  169. DWORD m_dwNPOutstanding;
  170. DWORD m_dwNPAllocated;
  171. };
  172. #endif