request.setCanaryConfig(context.getCanaryConfig()); CanaryExecutionRequest executionRequest = new CanaryExecutionRequest() .setScopes(context.getScopes()) .setThresholds(context.getScoreThresholds()) .setSiteLocal(context.getSiteLocal());
.canaryDuration(canaryExecutionRequest != null ? canaryExecutionRequest.calculateDuration() : null) .build();
.collect(Collectors.toSet()); if (requiredScopes.size() > 0 && canaryExecutionRequest.getScopes() == null) { throw new IllegalArgumentException("Canary metrics require scopes, but no scopes were provided in the execution request."); Set<String> providedScopes = canaryExecutionRequest.getScopes() == null ? Collections.emptySet() : canaryExecutionRequest.getScopes().keySet(); requiredScopes.removeAll(providedScopes); if (requiredScopes.size() > 0) { .build()); final CanaryClassifierThresholdsConfig orchestratorScoreThresholds = canaryExecutionRequest.getThresholds(); if (orchestratorScoreThresholds == null) { throw new IllegalArgumentException("Execution request must contain thresholds");
private CanaryScope getScopeForNamedScope(CanaryExecutionRequest executionRequest, String scopeName, boolean isCanary) { CanaryScopePair canaryScopePair = executionRequest.getScopes().get(scopeName); CanaryScope canaryScope = isCanary ? canaryScopePair.getExperimentScope() : canaryScopePair.getControlScope(); if (canaryScope == null) { throw new IllegalArgumentException("Canary scope for named scope " + scopeName + " is missing experimentScope or controlScope keys"); } return canaryScope; }
private CanaryScope getScopeForNamedScope(CanaryExecutionRequest executionRequest, String scopeName, boolean isCanary) { CanaryScopePair canaryScopePair = executionRequest.getScopes().get(scopeName); CanaryScope canaryScope = isCanary ? canaryScopePair.getExperimentScope() : canaryScopePair.getControlScope(); if (canaryScope == null) { throw new IllegalArgumentException("Canary scope for named scope " + scopeName + " is missing experimentScope or controlScope keys"); } return canaryScope; }
request.setCanaryConfig(context.getCanaryConfig()); CanaryExecutionRequest executionRequest = new CanaryExecutionRequest() .setScopes(context.getScopes()) .setThresholds(context.getScoreThresholds()) .setSiteLocal(context.getSiteLocal());
.collect(Collectors.toSet()); if (requiredScopes.size() > 0 && canaryExecutionRequest.getScopes() == null) { throw new IllegalArgumentException("Canary metrics require scopes, but no scopes were provided in the execution request."); Set<String> providedScopes = canaryExecutionRequest.getScopes() == null ? Collections.emptySet() : canaryExecutionRequest.getScopes().keySet(); requiredScopes.removeAll(providedScopes); if (requiredScopes.size() > 0) { .build()); final CanaryClassifierThresholdsConfig orchestratorScoreThresholds = canaryExecutionRequest.getThresholds(); if (orchestratorScoreThresholds == null) { throw new IllegalArgumentException("Execution request must contain thresholds");
.canaryDuration(canaryExecutionRequest != null ? canaryExecutionRequest.calculateDuration() : null) .build();