Funzioni dei contatori delle prestazioni
Usare le funzioni seguenti per utilizzare e fornire dati sulle prestazioni.
Funzioni consumer
Funzioni pdh (Performance Data Helper)
Usare le funzioni PDH (Performance Data Helper) per usare i dati sulle prestazioni dei provider di dati delle prestazioni V1 e V2.
Nota
Le app OneCore di Windows non possono usare le funzioni PDH. Se si scrivono app Di Windows OneCore, usare funzioni consumer PerfLib V2.
- CounterPathCallBack
- PdhAddCounter
- PdhAddEnglishCounter
- PdhBindInputDataSource
- PdhBrowseCounters
- PdhBrowseCountersH
- PdhCalculateCounterFromRawValue
- PdhCloseLog
- PdhCloseQuery
- PdhCollectQueryData
- PdhCollectQueryDataEx
- PdhCollectQueryDataWithTime
- PdhComputeCounterStatistics
- PdhConnectMachine
- PdhEnumLogSetNames
- PdhEnumMachines
- PdhEnumMachinesH
- PdhEnumObjectItems
- PdhEnumObjectItemsH
- PdhEnumObjects
- PdhEnumObjectsH
- PdhExpandCounterPath
- PdhExpandWildCardPath
- PdhExpandWildCardPathH
- PdhFormatFromRawValue
- PdhGetCounterInfo
- PdhGetCounterTimeBase
- PdhGetDataSourceTimeRange
- PdhGetDataSourceTimeRangeH
- PdhGetDefaultPerfCounter
- PdhGetDefaultPerfCounterH
- PdhGetDefaultPerfObject
- PdhGetDefaultPerfObjectH
- PdhGetDllVersion
- PdhGetFormattedCounterArray
- PdhGetFormattedCounterValue
- PdhGetLogFileSize
- PdhGetRawCounterArray
- PdhGetRawCounterValue
- PdhIsRealTimeQuery
- PdhLookupPerfIndexByName
- PdhLookupPerfNameByIndex
- PdhMakeCounterPath
- PdhOpenLog
- PdhOpenQuery
- PdhOpenQueryH
- PdhParseCounterPath
- PdhParseInstanceName
- PdhReadRawLogRecord
- PdhRemoveCounter
- PdhSelectDataSource
- PdhSetCounterScaleFactor
- PdhSetDefaultRealTimeDataSource
- PdhSetQueryTimeRange
- PdhUpdateLog
- PdhUpdateLogFileCatalog
- PdhValidatePath
- PdhValidatePathEx
Funzioni consumer perfLib V2
Usare le funzioni consumer PerfLib V2 per utilizzare i dati sulle prestazioni dei provider di dati delle prestazioni V2 se non è possibile usare le funzioni PDH (Performance Data Helper). Queste funzioni possono essere usate durante la scrittura di applicazioni OneCore per raccogliere contatori V2 o quando è necessario raccogliere contatori V2 specifici con dipendenze e overhead minimi.
Mancia
Le funzioni Consumer PerfLib V2 sono più difficili da usare rispetto alle funzioni PDH (Performance Data Helper) e supportano solo la raccolta di dati dai provider V2. Le funzioni PDH devono essere preferite per la maggior parte delle applicazioni.
- PerfAddCounters
- PerfCloseQueryHandle
- PerfDeleteCounters
- PerfEnumerateCounterSet
- PerfEnumerateCounterSetInstances
- PerfOpenQueryHandle
- PerfQueryCounterData
- PerfQueryCounterInfo
- PerfQueryCounterSetRegistrationInfo
Funzioni del provider
Funzioni del provider PerfLib V2
provider di dati delle prestazioni V2 usare le funzioni seguenti:
- AllocateMemory
- ControlCallback
- CounterCleanup
- CounterInitialize
- FreeMemory
- PerfCreateInstance
- PerfDecrementULongCounterValue
- PerfDecrementULongLongCounterValue
- PerfDeleteInstance
- PerfIncrementULongCounterValue
- PerfIncrementULongLongCounterValue
- PerfQueryInstance
- PerfSetCounterSetInfo
- PerfSetULongCounterValue
- PerfSetULongLongCounterValue
- PerfSetCounterRefValue
- PerfStartProvider
- PerfStartProviderEx
- PerfStopProvider
Nota
Per installare e disinstallare i provider V2, usare gli strumenti di lodctr e unlodctr. Non è possibile usare LoadPerfCounterTextStrings e UnloadPerfCounterTextStrings funzioni per installare e disinstallare i provider V2.
Funzioni DLL per le prestazioni
provider di dati delle prestazioni V1 implementare una DLL che fornisce le funzioni seguenti:
- ClosePerformanceData
- CollectPerformanceData
- OpenPerformanceData
Nota
A causa di problemi significativi di prestazioni e affidabilità, i provider di dati sulle prestazioni V1 sono deprecati. Anche se è ancora possibile usare una DLL dell'estensione delle prestazioni per fornire dati del contatore, è consigliabile creare un provider V2. È anche consigliabile sostituire i provider V1 esistenti con i provider V2.
I provider V1 possono essere installati e disinstallati usando il lodctr e strumenti di unlodctr o chiamando le funzioni seguenti:
- LoadPerfCounterTextStrings
- unloadPerfCounterTextStrings