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.

123 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. auxctrs.h
  5. Abstract:
  6. This module defines the auxiliary counters for Internet Common Services.
  7. Author:
  8. Murali R. Krishnan ( MuraliK ) 02-Apr-1996
  9. Environment:
  10. Windows NT - User Mode
  11. Project:
  12. Internet Services Common DLL
  13. Revision History:
  14. --*/
  15. # ifndef _IIS_AUX_COUNTERS_HXX_
  16. # define _IIS_AUX_COUNTERS_HXX_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. /************************************************************
  21. * Symbolic Definitions
  22. ************************************************************/
  23. /*++
  24. Counters belong to two categories
  25. 1. Active Counter - one that counts up and down
  26. It is expected that this counter consists of the current
  27. active items and hence this should not be wildly high, unless
  28. there are large # of counted objects.
  29. 2. Cumulative Counters - counts values up and up
  30. This count value is used to measure the # of times event(s)
  31. related to this counter occurred.
  32. Naming Conventions:
  33. prefixes used are: Aac & Cac
  34. Aac - Active Auxiliary Counter
  35. Cac - Cumulative Auxiliary Counter
  36. Ac - Auxiliar Counter
  37. --*/
  38. typedef enum { // Ac - stands for Aux Counters.
  39. CacBufferAllocs = 0,
  40. CacBufferFrees,
  41. CacBufferReallocs,
  42. CacBufferCons, // constructed buffer class items
  43. CacBufferDest, // destructed buffer class items
  44. CacBufferLT32, // less than 32 byte allocs
  45. CacBufferGE32, // >= 32
  46. CacCopyLT16, // less than 16 byte allocs
  47. CacCopyGE16, // >= 16
  48. CacStringCons,
  49. CacStringDest,
  50. CacStringCopy,
  51. CacStringAppend,
  52. CacMultiszCopy,
  53. CacMultiszAppend,
  54. AacSBMaxCounters // sentinel counter
  55. } ENUM_IIS_AUX_COUNTER;
  56. # define NUM_AUX_COUNTERS (AacSBMaxCounters)
  57. #ifdef IIS_AUX_COUNTERS
  58. //
  59. // Macros for operating on these counters
  60. //
  61. # define AcIncrement( acCounter) \
  62. (((acCounter) < NUM_AUX_COUNTERS) ? \
  63. InterlockedIncrement( g_SBAuxCounters+(acCounter)) : \
  64. 0)
  65. # define AcDecrement( acCounter) \
  66. (((acCounter) < NUM_AUX_COUNTERS) ? \
  67. InterlockedDecrement( g_SBAuxCounters+(acCounter)) : \
  68. 0)
  69. # define AcCounter( acCounter) \
  70. (((acCounter) < NUM_AUX_COUNTERS) ? g_SBAuxCounters[acCounter] : 0)
  71. extern LONG g_SBAuxCounters[];
  72. # else // IIS_AUX_COUNTERS
  73. # define AcIncrement( acCounter) (0) /* do nothing */
  74. # define AcDecrement( acCounter) (0) /* do nothing */
  75. # define AcCounter ( acCounter) (0) /* do nothing */
  76. #endif // IIS_AUX_COUNTERS
  77. # endif // _IIS_AUX_COUNTERS_HXX_
  78. /************************ End of File ***********************/