//---------------------------------------------------------------------------
// DSAccess Performance Monitor  .H file for LODCTR.EXE
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// Cache Instance Object and counters
//
// One object instance per unique Cache Instance (2 max)
//---------------------------------------------------------------------------
#define CACHE_OBJ                                          0
#define CACHE_HITS_RATE                                    2
#define CACHE_MISSES_RATE                                  4
#define CACHE_EXPIRIES_RATE                                6
#define CACHE_INSERTS_RATE                                 8
#define CACHE_LDAP_SEARCHES_RATE                          10
#define CACHE_ASYNC_NOTIFIES                              12
#define CACHE_ASYNC_READS                                 14
#define CACHE_ASYNC_SEARCHES                              16
#define CACHE_MEMORY_SIZE                                 18

#define CACHE_TOTAL_ENTRIES                               20
#define CACHE_DN_ENTRIES                                  22
#define CACHE_SRCH_ENTRIES                                24
#define CACHE_NFDN_ENTRIES                                26
#define CACHE_NFGUID_ENTRIES                              28

#define CACHE_SIZE_TOTAL_ENTRIES                          30
#define CACHE_SIZE_DN_ENTRIES                             32
#define CACHE_SIZE_SRCH_ENTRIES                           34
#define CACHE_SIZE_NFDN_ENTRIES                           36
#define CACHE_SIZE_NFGUID_ENTRIES                         38

#define CACHE_LRU_ENTRIES                                 40
#define CACHE_TTL                                         42
#define CACHE_MAX_ENTRIES                                 44
#define CACHE_MAX_MEMORY_SIZE                             46


//---------------------------------------------------------------------------
// 64 bit counters for accumulating totals
//---------------------------------------------------------------------------
#define CACHE_HITS_TOTAL                                  48
#define CACHE_MISSES_TOTAL                                50
#define CACHE_EXPIRIES_TOTAL                              52
#define CACHE_INSERTS_TOTAL                               54
#define CACHE_LDAP_SEARCHES_TOTAL                         56



//---------------------------------------------------------------------------
// DS Context Object and counters
//
// One object instance per DS Context (24 max)
//---------------------------------------------------------------------------
#define CONTEXT_OBJ                                       58
#define CONTEXT_HITS_RATE                                 60
#define CONTEXT_MISSES_RATE                               62
#define CONTEXT_LDAP_SEARCHES_RATE                        64
#define CONTEXT_ASYNC_NOTIFIES                            66
#define CONTEXT_ASYNC_READS                               68
#define CONTEXT_ASYNC_SEARCHES                            70


//---------------------------------------------------------------------------
// 64 bit counters for accumulating totals
//---------------------------------------------------------------------------
#define CONTEXT_HITS_TOTAL                                72
#define CONTEXT_MISSES_TOTAL                              74
#define CONTEXT_LDAP_SEARCHES_TOTAL                       76


//---------------------------------------------------------------------------
// Per Process API counters
//
// One object instance per process using dsaccess
//---------------------------------------------------------------------------
#define PROC_OBJ                                          78
#define PROC_PROCID                                       80

#define PROC_USR_SYNC_DC                                  82
#define PROC_USR_SYNC_GC                                  84
#define PROC_USR_ASYNC_DC                                 86
#define PROC_USR_ASYNC_GC                                 88
#define PROC_GC_NOTIFY                                    90
#define PROC_CFG_SYNC                                     92
#define PROC_CFG_ASYNC                                    94
#define PROC_DC_NOTIFY                                    96

//---------------------------------------------------------------------------
// LDAP Search Time
//---------------------------------------------------------------------------
#define PROC_TIME_Read                                    98
#define PROC_TIME_Search                                 100

#define PROC_RATE_HrSearch                               102
#define PROC_RATE_HrSearchEx                             104
#define PROC_RATE_HrSearchGuid                           106
#define PROC_RATE_HrReadDsval                            108
#define PROC_RATE_HrReadDsvalGuid                        110
#define PROC_RATE_HrAddChangeNotify                      112
#define PROC_RATE_HrAddChangeNotifyGuid                  114
#define PROC_RATE_HrRemoveChangeNotify                   116
#define PROC_RATE_HrCreateObject                         118
#define PROC_RATE_HrModifyObject                         120
#define PROC_RATE_HrModifyObjectGuid                     122
#define PROC_RATE_HrDeleteObject                         124
#define PROC_RATE_HrDeleteObjectGuid                     126
#define PROC_RATE_AddCachedObject                        128

//---------------------------------------------------------------------------
// 64 bit counters for accumulating totals
//---------------------------------------------------------------------------
#define PROC_TOTAL_HrSearch                              130
#define PROC_TOTAL_HrSearchEx                            132
#define PROC_TOTAL_HrSearchGuid                          134
#define PROC_TOTAL_HrReadDsval                           136
#define PROC_TOTAL_HrReadDsvalGuid                       138
#define PROC_TOTAL_HrAddChangeNotify                     140
#define PROC_TOTAL_HrAddChangeNotifyGuid                 142
#define PROC_TOTAL_HrRemoveChangeNotify                  144
#define PROC_TOTAL_HrCreateObject                        146
#define PROC_TOTAL_HrModifyObject                        148
#define PROC_TOTAL_HrModifyObjectGuid                    150
#define PROC_TOTAL_HrDeleteObject                        152
#define PROC_TOTAL_HrDeleteObjectGuid                    154
#define PROC_TOTAL_AddCachedObject                       156




//---------------------------------------------------------------------------
// Markers for last counters for each object type
//---------------------------------------------------------------------------
#define CACHE_SHORT_OBJ_END     CACHE_MAX_MEMORY_SIZE
#define CACHE_SHORT_OBJ_NUM     (CACHE_SHORT_OBJ_END - CACHE_OBJ) / 2
#define CACHE_LONG_OBJ_END      CACHE_LDAP_SEARCHES_TOTAL
#define CACHE_LONG_OBJ_NUM      (CACHE_LONG_OBJ_END - CACHE_SHORT_OBJ_END) / 2


#define CONTEXT_SHORT_OBJ_END   CONTEXT_ASYNC_SEARCHES
#define CONTEXT_SHORT_OBJ_NUM   (CONTEXT_SHORT_OBJ_END - CONTEXT_OBJ) / 2
#define CONTEXT_LONG_OBJ_END    CONTEXT_LDAP_SEARCHES_TOTAL
#define CONTEXT_LONG_OBJ_NUM    (CONTEXT_LONG_OBJ_END - CONTEXT_SHORT_OBJ_END) / 2


#define PROC_SHORT_OBJ_END      PROC_RATE_AddCachedObject
#define PROC_SHORT_OBJ_NUM      (PROC_SHORT_OBJ_END - PROC_OBJ) / 2
#define PROC_LONG_OBJ_END       PROC_TOTAL_AddCachedObject
#define PROC_LONG_OBJ_NUM       (PROC_LONG_OBJ_END - PROC_SHORT_OBJ_END) / 2


#define CACHE_OBJ_NUM           (CACHE_SHORT_OBJ_NUM + CACHE_LONG_OBJ_NUM)
#define CONTEXT_OBJ_NUM         (CONTEXT_SHORT_OBJ_NUM + CONTEXT_LONG_OBJ_NUM)
#define PROC_OBJ_NUM            (PROC_SHORT_OBJ_NUM + PROC_LONG_OBJ_NUM)
