C# 클래스 Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.Implementation.PerformanceCounterUtility

Utility functionality for performance counter collection.
파일 보기 프로젝트 열기: Microsoft/ApplicationInsights-dotnet-server 1 사용 예제들

공개 메소드들

메소드 설명
CreateAndValidateCounter ( string perfCounterName, IEnumerable win32Instances, IEnumerable clrInstances, bool &usesInstanceNamePlaceholder, string &error ) : PerformanceCounter

Validates the counter by parsing.

FormatPerformanceCounter ( PerformanceCounter pc ) : string

Formats a counter into a readable string.

FormatPerformanceCounter ( string categoryName, string counterName, string instanceName ) : string

Formats a counter into a readable string.

InvalidatePlaceholderCache ( ) : void

Invalidates placeholder cache.

IsWebAppRunningInAzure ( ) : bool

Searches for the environment variable specific to Azure web applications and confirms if the current application is a web application or not.

MatchInstancePlaceholder ( string instanceName ) : Match

Matches an instance name against the placeholder regex.

ParsePerformanceCounter ( string performanceCounter, IEnumerable win32Instances, IEnumerable clrInstances ) : PerformanceCounter

Parses a performance counter canonical string into a PerformanceCounter object.

This method also performs placeholder expansion.

ParsePerformanceCounter ( string performanceCounter, IEnumerable win32Instances, IEnumerable clrInstances, bool &usesInstanceNamePlaceholder ) : PerformanceCounter

Parses a performance counter canonical string into a PerformanceCounter object.

This method also performs placeholder expansion.

SDKVersionPrefix ( ) : string

Differentiates the SDK version prefix for azure web applications with standard applications.

비공개 메소드들

메소드 설명
ExpandInstanceName ( string instanceName, IEnumerable win32Instances, IEnumerable clrInstances, bool &usesPlaceholder ) : string
FindProcessInstance ( int pid, IEnumerable instances, string categoryName, string counterName ) : string
GetClrProcessInstances ( ) : IList
GetInstanceForClrProcess ( IEnumerable clrInstances ) : string
GetInstanceForCurrentW3SvcWorker ( ) : string
GetInstanceForWin32Process ( IEnumerable win32Instances ) : string
GetInstanceFromApplicationDomain ( string domainFriendlyName ) : string
GetInstances ( string categoryName ) : IList
GetWin32ProcessInstances ( ) : IList

메소드 상세

CreateAndValidateCounter() 공개 정적인 메소드

Validates the counter by parsing.
public static CreateAndValidateCounter ( string perfCounterName, IEnumerable win32Instances, IEnumerable clrInstances, bool &usesInstanceNamePlaceholder, string &error ) : PerformanceCounter
perfCounterName string Performance counter name to validate.
win32Instances IEnumerable Windows 32 instances.
clrInstances IEnumerable CLR instances.
usesInstanceNamePlaceholder bool Boolean to check if it is using an instance name place holder.
error string Error message.
리턴 System.Diagnostics.PerformanceCounter

FormatPerformanceCounter() 공개 정적인 메소드

Formats a counter into a readable string.
public static FormatPerformanceCounter ( PerformanceCounter pc ) : string
pc System.Diagnostics.PerformanceCounter
리턴 string

FormatPerformanceCounter() 공개 정적인 메소드

Formats a counter into a readable string.
public static FormatPerformanceCounter ( string categoryName, string counterName, string instanceName ) : string
categoryName string
counterName string
instanceName string
리턴 string

InvalidatePlaceholderCache() 공개 정적인 메소드

Invalidates placeholder cache.
public static InvalidatePlaceholderCache ( ) : void
리턴 void

IsWebAppRunningInAzure() 공개 정적인 메소드

Searches for the environment variable specific to Azure web applications and confirms if the current application is a web application or not.
public static IsWebAppRunningInAzure ( ) : bool
리턴 bool

MatchInstancePlaceholder() 공개 정적인 메소드

Matches an instance name against the placeholder regex.
public static MatchInstancePlaceholder ( string instanceName ) : Match
instanceName string Instance name to match.
리턴 System.Text.RegularExpressions.Match

ParsePerformanceCounter() 공개 정적인 메소드

Parses a performance counter canonical string into a PerformanceCounter object.
This method also performs placeholder expansion.
public static ParsePerformanceCounter ( string performanceCounter, IEnumerable win32Instances, IEnumerable clrInstances ) : PerformanceCounter
performanceCounter string
win32Instances IEnumerable
clrInstances IEnumerable
리턴 System.Diagnostics.PerformanceCounter

ParsePerformanceCounter() 공개 정적인 메소드

Parses a performance counter canonical string into a PerformanceCounter object.
This method also performs placeholder expansion.
public static ParsePerformanceCounter ( string performanceCounter, IEnumerable win32Instances, IEnumerable clrInstances, bool &usesInstanceNamePlaceholder ) : PerformanceCounter
performanceCounter string
win32Instances IEnumerable
clrInstances IEnumerable
usesInstanceNamePlaceholder bool
리턴 System.Diagnostics.PerformanceCounter

SDKVersionPrefix() 공개 정적인 메소드

Differentiates the SDK version prefix for azure web applications with standard applications.
public static SDKVersionPrefix ( ) : string
리턴 string