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.

103 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. PassportPerfObjects.h
  5. Abstract:
  6. Perormace Objects Definition
  7. Author:
  8. Christopher Bergh (cbergh) 10-Sept-1988
  9. Revision History:
  10. - added multi-object support 1-Oct-98
  11. - added default counter types 22-Oct-98
  12. --*/
  13. #if !defined(PASSPORTPERFOBJECTS_H)
  14. #define PASSPORTPERFOBJECTS_H
  15. #include "PassportPerfDefs.h"
  16. #include "msppcntr.h"
  17. // -------------------------------------------------------------------
  18. // counter types
  19. // 1. PERF_COUNTER_COUNTER = 1000:
  20. /* Divide delta by delta time. Display suffix: "/sec" */
  21. // 2. PERF_COUNTER_RAWCOUNT = 1001:
  22. /* Indicates the data is a counter which should not be */
  23. /* time averaged on display (such as an error counter on a serial line) */
  24. /* Display as is. No Display Suffix.*/
  25. // 3. PERF_AVERAGE_TIMER = 1002:
  26. /* A timer which, when divided by an average base, produces a time */
  27. /* in seconds which is the average time of some operation. This */
  28. /* timer times total operations, and the base is the number of opera- */
  29. /* tions. Display Suffix: "sec" */
  30. // 4. PERF_COUNTER_DELTA = 1003,
  31. /* This counter is used to display the difference from one sample */
  32. /* to the next. The counter value is a constantly increasing number */
  33. /* and the value displayed is the difference between the current */
  34. /* value and the previous value. Negative numbers are not allowed */
  35. /* which shouldn't be a problem as long as the counter value is */
  36. /* increasing or unchanged. */
  37. //
  38. // Note: PERF_COUNTER_RAWCOUNT is the default counter type
  39. // To add another counter type increment the number of counters and
  40. // add the counter type according to the pattern:
  41. // {
  42. // { <countername1>, <Counter Type> },
  43. // { <countername2}, <Counter Type> }
  44. // }
  45. // -------------------------------------------------------------------
  46. // create objects
  47. PassportObjectData PMCountersObject = {
  48. TEXT("msppcntr"), // object name
  49. PASSPORT_PERF_BLOCK, // const string, name of MemoryMapped File
  50. TEXT("msppcntr.dll"), // dll name
  51. TEXT("msppcntr"), // ini file name
  52. FALSE, // must be FALSE
  53. 20, // number of default counter types
  54. { // default counter types
  55. {PM_REQUESTS_SEC,PERF_COUNTER_COUNTER},
  56. {PM_REQUESTS_TOTAL,PERF_COUNTER_RAWCOUNT},
  57. {PM_AUTHSUCCESS_SEC,PERF_COUNTER_COUNTER},
  58. {PM_AUTHSUCCESS_TOTAL,PERF_COUNTER_RAWCOUNT},
  59. {PM_AUTHFAILURE_SEC,PERF_COUNTER_COUNTER},
  60. {PM_AUTHFAILURE_TOTAL,PERF_COUNTER_RAWCOUNT},
  61. {PM_FORCEDSIGNIN_SEC,PERF_COUNTER_COUNTER},
  62. {PM_FORCEDSIGNIN_TOTAL,PERF_COUNTER_RAWCOUNT},
  63. {PM_PROFILEUPDATES_SEC,PERF_COUNTER_COUNTER},
  64. {PM_PROFILEUPDATES_TOTAL,PERF_COUNTER_RAWCOUNT},
  65. {PM_INVALIDREQUESTS_SEC,PERF_COUNTER_COUNTER},
  66. {PM_INVALIDREQUESTS_TOTAL,PERF_COUNTER_RAWCOUNT},
  67. {PM_PROFILECOMMITS_SEC,PERF_COUNTER_COUNTER},
  68. {PM_PROFILECOMMITS_TOTAL,PERF_COUNTER_RAWCOUNT},
  69. {PM_VALIDPROFILEREQ_SEC,PERF_COUNTER_COUNTER},
  70. {PM_VALIDPROFILEREQ_TOTAL,PERF_COUNTER_RAWCOUNT},
  71. {PM_NEWCOOKIES_SEC,PERF_COUNTER_COUNTER},
  72. {PM_NEWCOOKIES_TOTAL,PERF_COUNTER_RAWCOUNT},
  73. {PM_VALIDREQUESTS_SEC,PERF_COUNTER_COUNTER},
  74. {PM_VALIDREQUESTS_TOTAL,PERF_COUNTER_RAWCOUNT}
  75. },
  76. NULL, // must be null
  77. };
  78. // add objects to global object array
  79. PassportObjectData *g_PObject[] = {
  80. &PMCountersObject
  81. };
  82. #define NUM_PERFMON_OBJECTS (sizeof(g_PObject) / sizeof(g_PObject[0]))
  83. #endif