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.

80 lines
3.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996
  5. //
  6. // File: IdqPerf.hxx
  7. //
  8. // Contents: Perfmon counters for ISAPI search engine.
  9. //
  10. // History: 15-Mar-1996 KyleP Created (from perfci.hxx)
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. #include <perfwci.h>
  15. //
  16. // The data definition of CI ISAPI HTTP
  17. //
  18. struct CI_ISAPI_DATA_DEFINITION {
  19. PERF_OBJECT_TYPE CIISAPIObjectType;
  20. PERF_COUNTER_DEFINITION NumCacheItems;
  21. PERF_COUNTER_DEFINITION NumCacheHits;
  22. PERF_COUNTER_DEFINITION NumCacheHitsAndMisses1;
  23. PERF_COUNTER_DEFINITION NumCacheMisses;
  24. PERF_COUNTER_DEFINITION NumCacheHitsAndMisses2;
  25. PERF_COUNTER_DEFINITION NumRunningQueries;
  26. PERF_COUNTER_DEFINITION NumTotalQueries;
  27. PERF_COUNTER_DEFINITION NumQueriesPerMinute;
  28. PERF_COUNTER_DEFINITION NumRequestsQueued;
  29. PERF_COUNTER_DEFINITION NumRequestsRejected;
  30. };
  31. #define CI_ISAPI_TOTAL_NUM_COUNTERS (sizeof(CI_ISAPI_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE)) / \
  32. sizeof(PERF_COUNTER_DEFINITION)
  33. //
  34. // Struct for sharing between idq.dll and qperf.dll
  35. //
  36. struct CI_ISAPI_COUNTERS
  37. {
  38. ULONG _cCacheItems; // Number of items in cache
  39. ULONG _cCacheHits; // Number of cache hits
  40. ULONG _cCacheMisses; // Number of cache misses
  41. ULONG _cRunningQueries; // Number of running queries
  42. ULONG _cQueriesPerMinute; // Number of queries per minute.
  43. ULONG _cCacheHitsAndMisses; // Sum of hits and misses
  44. ULONG _cTotalQueries; // Number of new queries
  45. ULONG _cRequestsQueued; // Current # of queued requests
  46. ULONG _cRequestsRejected; // Total # of rejected requests
  47. };
  48. #define NUM_CACHE_ITEMS_OFF sizeof(DWORD)
  49. #define NUM_CACHE_HITS_OFF ( NUM_CACHE_ITEMS_OFF + sizeof(DWORD) )
  50. #define NUM_CACHE_MISSES_OFF ( NUM_CACHE_HITS_OFF + sizeof(DWORD) )
  51. #define NUM_RUNNING_QUERIES_OFF ( NUM_CACHE_MISSES_OFF + sizeof(DWORD) )
  52. #define NUM_QUERIES_PER_MINUTE_OFF ( NUM_RUNNING_QUERIES_OFF + sizeof(DWORD) )
  53. #define NUM_CACHE_HITS_AND_MISSES_OFF ( NUM_QUERIES_PER_MINUTE_OFF + sizeof(DWORD) )
  54. #define NUM_TOTAL_QUERIES_OFF ( NUM_CACHE_HITS_AND_MISSES_OFF + sizeof(DWORD) )
  55. #define NUM_REQUESTS_QUEUED_OFF ( NUM_TOTAL_QUERIES_OFF + sizeof(DWORD) )
  56. #define NUM_REQUESTS_REJECTED_OFF ( NUM_REQUESTS_QUEUED_OFF + sizeof(DWORD) )
  57. #define CI_ISAPI_SIZE_OF_COUNTER_BLOCK ( NUM_REQUESTS_REJECTED_OFF + sizeof(DWORD) )
  58. #define CI_ISAPI_PERF_SHARED_MEM L"Global\\CIISAPI"
  59. extern "C" {
  60. //
  61. // Functions exported in the Performance DLL
  62. //
  63. PM_OPEN_PROC InitializeCIISAPIPerformanceData;
  64. PM_COLLECT_PROC CollectCIISAPIPerformanceData;
  65. PM_CLOSE_PROC DoneCIISAPIPerformanceData;
  66. }