BR-005: Timing is only recorded when both the global switch and any per-method attribute allow it¶
Field
Value
Statement
Timing is only recorded when both the global enable switch and any per-method attribute allow it.
Trigger
Global: CodeTimer.Enabled == true. Per-method: a CodeTimerAttribute is present on the target MethodBase with Enabled == true (when using the MethodBase-based Start/Stop overloads); if no attribute is present, the attribute check is skipped and the call still proceeds via the private key-based Start.
BR-006: Result XML omits statistically insignificant attributes¶
Field
Value
Statement
Result XML omits statistical attributes when they are not meaningful.
Trigger
An item's Qty <= 1 (no shortest/longest/average/qty attributes emitted); an item's Elapsed <= 0 (no ms attribute, and children are not recursed into); a span's computed milliseconds is <= 0 (filtered out of spans output).
Enforcement
CodeTimerResult.RecurseXml
Outcome
Produces a compact XML tree that only reports statistically meaningful measurements.
All six rules above are enforced entirely within the compiled assembly; none involve database or SQL interactions, so the optional Tables/SQL fields are omitted from the per-rule tables.
The orphaned WinForms viewer files (CodeTimerModel.cs, CodeTimerResults.cs, CodeTimerResults.Designer.cs) are excluded from the compiled project and therefore do not contribute any enforced business rules to this page.