Method CompareEntries
- Namespace
- QueryGuard
- Assembly
- QueryGuard.Core.dll
CompareEntries(QueryGuardBaseline, IEnumerable<QueryGuardBaselineEntry>)
Compares recorded measurements against a baseline.
public static QueryGuardBaselineComparison CompareEntries(QueryGuardBaseline baseline, IEnumerable<QueryGuardBaselineEntry> measured)
Parameters
baselineQueryGuardBaselineThe recorded baseline. Empty is valid.
measuredIEnumerable<QueryGuardBaselineEntry>What each scope cost in this run.
Returns
- QueryGuardBaselineComparison
The comparison.
Remarks
For measurements that did not come from a live run: read back from JSON reports, for instance, which is how the command-line tool works. An entry is what a comparison actually needs; a result is just a convenient thing to derive one from.
A separate name rather than an overload, because two overloads differing only in element type
make Compare(baseline, []) ambiguous: a collection expression has nothing to infer from.
The compiler caught that on the existing tests, which is a better place to find it than a user's
build.
Scopes present in the baseline but absent from measured are ignored rather than
reported as removed. A test run filtered to one project would otherwise claim every other
endpoint had been deleted, and being wrong that loudly is worse than saying nothing.
Exceptions
- ArgumentNullException
A required argument is null.