AEWExperimentAssignmentSummary 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

按特征计算的变体分配计数

列出特征分配中每个变体的总分配数。

// Variant assignment counts by features
AEWExperimentAssignmentSummary
| summarize
    IsControlVariant = take_any(IsControlVariant),
    AllocationPercentage = take_any(AllocationPercentage),
    AssignmentEventCount = sum(AssignmentEventCount),
    EarliestAssignment = min(MinTimeGenerated),
    LatestAssignment = max(MaxTimeGenerated)
    by FeatureName, AllocationId, Variant
| order by FeatureName asc, LatestAssignment desc, Variant asc

给定特征的最新记分卡元数据

查询给定特征的最新试验记分卡元数据。

// Latest scorecard metadata for a given feature
// set the feature flag name to query
let QueryFeature = "MyFeatureFlag";
AEWExperimentAssignmentSummary
| where FeatureName == QueryFeature
| summarize MaxTimeGenerated=max(MaxTimeGenerated), Variants=make_set(Variant, 1000) by AllocationId
| summarize arg_max(MaxTimeGenerated, *)
| join kind=inner AEWExperimentScorecards on AllocationId
| summarize arg_max(TimeGenerated, ScorecardId)
| project
    FeatureName, AllocationId, Variants,
    ScorecardId, AnalysisStartTime, AnalysisEndTime, Insights

给定功能的最新记分卡结果

查询给定特征的最新试验记分卡结果。

// Latest scorecard results for a given feature
// set the feature flag name to query
let QueryFeature = "MyFeatureFlag";
AEWExperimentAssignmentSummary
| where FeatureName == QueryFeature
| summarize arg_max(MaxTimeGenerated, AllocationId)
| join kind=inner AEWExperimentScorecards on AllocationId
| summarize arg_max(TimeGenerated, ScorecardId)
| join kind=inner AEWExperimentScorecardMetricPairs on ScorecardId
| project
    ScorecardId, MetricId, MetricDisplayName, MetricKind, MetricTags,
    TreatmentVariant, TreatmentCount, TreatmentMetricValue,
    ControlVariant, ControlCount, ControlMetricValue,
    TreatmentEffect, RelativeDifference, PValue, Insights