MeasurePerformanceAttribute - mwpowellhtx/MeasureIt GitHub Wiki
MeasureIt.MeasurePerformanceAttribute
The MeasurePerformanceAttribute
exposes several constructor parameters as well as properties.
Attribute usage
Parameter / Attribute |
Values |
validOn |
AttributeTargets.Method |
AllowMultiple |
true |
Inherited |
true (default) |
Constructor parameters
Parameter |
Type |
Description |
counterName |
System.String |
Counter name |
categoryType |
System.Type |
Performance counter category type |
adapterType |
System.Type |
Performance counter adapter type |
otherAdapterTypes |
System.Type[] (params ) |
Additional performance counter adapter types |
Properties
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 |
|
MayProceedUnabated |
System.Boolean |
``PublishCounter |
|
SampleRate |
System.Double |
1.0 |
|
Remarks
Multiple performance measurements may decorate a single method. Additionally, performance measurements found in derived classes overshadow those found in base classes.