_AspNet_Mvc_PerformanceMeasurementFilterAttribute
Michael Powell edited this page Feb 6, 2017
·
3 revisions
The PerformanceMeasurementFilterAttribute
exposes several constructor parameters as well as properties.
Parameter / Attribute | Values |
---|---|
validOn | AttributeTargets.Method |
AllowMultiple | true |
Inherited | true (default) |
Parameter | Type | Description |
---|---|---|
prefix | System.String |
Prefix for the name (defaults to fully qualified method signature) |
categoryType | System.Type |
Performance counter category type |
adapterType | System.Type |
Performance counter adapter type |
otherAdapterTypes |
System.Type[] (params ) |
Additional performance counter adapter types |
Property | Type | Default | Description |
---|---|---|---|
ReadOnly |
System.Boolean (underlying, System.Nullable<System.Boolean>
|
false | |
InstanceLifetime | System.Diagnostics.PerformanceCounterInstanceLifetime |
Process |
|
PublishCounters | System.Boolean |
true | |
ThrowPublishErrors | System.Boolean |
false | |
PublishEvent | System.Boolean |
true | |
SampleRate | System.Double |
1.0 |
|
Boundary | MeasureIt.Discovery.MeasurementBoundary[] |
new MeasurementBoundary[] {BeginAction, EndAction} |
Multiple performance measurements may decorate a single method. Additionally, performance measurements found in derived classes overshadow those found in base classes.
MeasurementBoundary
is a key difference between the ASP.NET MVC measurements and the ad-hoc and ASP.NET Web API. We allow boundaries to be specified around begin/end and/or action/result.
- Framework agnostic
- ASP.NET