Skip to content

Commit

Permalink
feat(judges): Add visible property to judge interface and default t…
Browse files Browse the repository at this point in the history
…o false. (#87)
  • Loading branch information
Matt Duftler authored Sep 18, 2017
1 parent 1863ce6 commit 992a9c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@

import java.util.List;

public interface CanaryJudge {
String getName();
CanaryJudgeResult judge(CanaryConfig canaryConfig,
CanaryClassifierThresholdsConfig orchestratorScoreThresholds,
List<MetricSetPair> metricSetPairList);
public abstract class CanaryJudge {
public boolean isVisible() {
return false;
}

abstract public String getName();
abstract public CanaryJudgeResult judge(CanaryConfig canaryConfig,
CanaryClassifierThresholdsConfig orchestratorScoreThresholds,
List<MetricSetPair> metricSetPairList);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ case class Metric(name: String, values: Array[Double], label: String)
class NetflixACAJudge extends CanaryJudge with StrictLogging {
private final val judgeName = "NetflixACAJudge-v1.0"

override def isVisible: Boolean = true

override def getName: String = judgeName

override def judge(canaryConfig: CanaryConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.netflix.kayenta.metrics.MetricSetPair
import org.springframework.stereotype.Component

@Component
class RandomDummyJudge extends CanaryJudge{
class RandomDummyJudge extends CanaryJudge {
private final val _judgeName = "dredd-v1.0"

override def getName: String = _judgeName
Expand Down

0 comments on commit 992a9c0

Please sign in to comment.