CanaryEvaluator
AgentPrism.Core.dllPure decision logic that evaluates a CanaryPolicy against the current results of the canary and control arms.
public static class CanaryEvaluatorInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”It does not call a database or model. CanaryEvaluator.Evaluate operates only on
already collected ExperimentVariantResult data. Data collection is
the responsibility of CanaryEvaluationService. This separation has the same
reason as ExperimentAssignmentResolver.SelectVariant: tests run without a database.
This class is public because GET /api/experiments/{name}/canary in
AgentPrism.AspNetCore calculates the “latest evaluation” live with this
method. This has the same reason as public ExperimentAssignmentResolver.
Methods
Section titled “Methods”Evaluate(CanaryPolicy, IReadOnlyList<ExperimentVariantResult>, DateTimeOffset)
Section titled “ Evaluate(CanaryPolicy, IReadOnlyList<ExperimentVariantResult>, DateTimeOffset)”Evaluates the canary policy against the current results of the canary and control arms.
public static CanaryEvaluation Evaluate(CanaryPolicy policy, IReadOnlyList<ExperimentVariantResult> results, DateTimeOffset now)Parameters
Section titled “Parameters”policy CanaryPolicy
The canary policy.
results IReadOnlyList<ExperimentVariantResult>
The current results for all experiment arms.
now DateTimeOffset
The evaluation time in UTC.
Returns
Section titled “Returns”The evaluation result.