Leaked source code of windows server 2003
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.

130 lines
4.6 KiB

  1. /**************************************************************************
  2. * Copyright 2001 Microsoft Corporation. All Rights Reserved.
  3. *
  4. * File Name: Pop3SvcPerf.h
  5. *
  6. * Purpose:
  7. * Define those constants and enums required by pfappdll.h and pfMndll.h
  8. * ITEMS WHICH MUST BE DEFINED:
  9. * typedef enum GLOBAL_CNTR
  10. * typedef enum INST_CNTR
  11. * Array of PERF_COUNTER types (in sync with GLOBAL_CNTR)
  12. * Array of PERF_COUNTER types (in sync with INST_CNTR)
  13. *
  14. *
  15. *
  16. *************************************************************************/
  17. //
  18. // These are the names of the shared memory regions used by the single instance
  19. // PerfMon counter and the Per Instance PerfMon counters respectively.
  20. const LPTSTR szPOP3PerfMem = TEXT("POP3_PERF_MEM"); // GLOBAL
  21. const LPTSTR szPOP3InstPerfMem = TEXT("POP3_INST_PERF_MEM"); // INSTANCE
  22. const LPTSTR szPOP3InstPerfMutex = TEXT("POP3_INST_PERF_MUTEX"); // Mutex
  23. #define PERF_COUNTER_RAWCOUNT_NO_DISPLAY \
  24. (PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL |\
  25. PERF_DISPLAY_NOSHOW)
  26. //
  27. // Global Counters -- Enum's and associated config data
  28. enum GLOBAL_CNTR
  29. {
  30. e_gcTotConnection = 0, // Total connections since the service starts
  31. e_gcConnectionRate, // Connections per second
  32. e_gcTotMsgDnldCnt, // Total number of messages downloaded
  33. e_gcMsgDnldRate, // Messages downloaded per second
  34. e_gcFreeThreadCnt, // Free Thread Count
  35. e_gcConnectedSocketCnt,// Number of currently connected socket
  36. e_gcBytesReceived, // Total bytes received
  37. e_gcBytesReceiveRate, // Bytes received per second
  38. e_gcBytesTransmitted, // Bytes downloaded
  39. e_gcBytesTransmitRate, // Bytes downloaded per second
  40. e_gcFailedLogonCnt, // Number of failed logons
  41. e_gcAuthStateCnt, // Auth State Count
  42. e_gcTransStateCnt, // Trans State Count
  43. // Add new counters above this line, at end of enum.
  44. // cntrMaxGlobalCntrs *must* be last element
  45. cntrMaxGlobalCntrs
  46. };
  47. #ifdef PERF_DLL_ONCE
  48. // Type for each Global Counter
  49. // NOTE: g_rgdwGlobalCntrType *must* be kept in sync with GLOBAL_CNTR
  50. DWORD g_rgdwGlobalCntrType[] =
  51. {
  52. PERF_COUNTER_RAWCOUNT, // e_gcTotConnection
  53. PERF_COUNTER_COUNTER, // e_gcConnectionRate
  54. PERF_COUNTER_RAWCOUNT, //e_gcTotMsgDnldCnt,
  55. PERF_COUNTER_COUNTER, //e_gcMsgDnldRate,
  56. PERF_COUNTER_RAWCOUNT, //e_gcFreeThreadCnt,
  57. PERF_COUNTER_RAWCOUNT, //e_gcConnectedSocketCnt,
  58. PERF_COUNTER_RAWCOUNT, //e_gcBytesReceived,
  59. PERF_COUNTER_COUNTER, //e_gcBytesReceiveRate,
  60. PERF_COUNTER_RAWCOUNT, //e_gcBytesTransmitted,
  61. PERF_COUNTER_COUNTER, //e_gcBytesTransmitRate,
  62. PERF_COUNTER_RAWCOUNT, //e_gcFailedLogonCnt,
  63. PERF_COUNTER_RAWCOUNT, //e_gcAuthStateCnt,
  64. PERF_COUNTER_RAWCOUNT, //e_gcTransStateCnt,
  65. // Add new counter types above this line, at end of array.
  66. };
  67. DWORD g_rgdwGlobalCntrScale[] =
  68. {
  69. -3, //e_gcTotConnection
  70. 0, //e_gcConnectionRate
  71. -4, //e_gcTotMsgDnldCnt,
  72. 0, //e_gcMsgDnldRate,
  73. 0, //e_gcFreeThreadCnt,
  74. 0, //e_gcConnectedSocketCnt,
  75. -6, //e_gcBytesReceived,
  76. -4, //e_gcBytesReceiveRate,
  77. -6, //e_gcBytesTransmitted,
  78. -4, //e_gcBytesTransmitRate,
  79. 0, //e_gcFailedLogonCnt,
  80. 0, //e_gcAuthStateCnt,
  81. 0, //e_gcTransStateCnt,
  82. // Add new counter scales above this line, at end of array.
  83. };
  84. #endif // PERF_DLL_ONCE
  85. //
  86. // Instance Counters -- Enum's and associated config data
  87. enum INST_CNTR
  88. {
  89. // Add new Instance counters above this line, at end of enum.
  90. // cntrMaxInstCntrs *must* be last element
  91. cntrMaxInstCntrs=0,
  92. } ;
  93. #ifdef PERF_DLL_ONCE
  94. // Type for each Instance Counter
  95. // NOTE: must be kept in sync with E_INST_CNTR
  96. DWORD g_rgdwInstCntrType[] =
  97. {
  98. // Add new counter types above this line, at end of array.
  99. PERF_COUNTER_COUNTER,
  100. };
  101. #endif // PERF_DLL_ONCE