-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Graff
committed
Jun 22, 2017
1 parent
996876f
commit f1f25d8
Showing
6 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryAnalysisResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryAnalysisResult { | ||
|
||
// Todo: (mgraff) How to describe pre- and post-filter results? | ||
// Todo: (mgraff) Add a place to return additional timeseries data | ||
// Todo: (mgraff) Add a way to describe graph annotations on canary, baseline, and additional TS | ||
|
||
@NotNull | ||
@Getter | ||
private String name; | ||
|
||
@NotNull | ||
@Getter | ||
private Map<String, String> tags; | ||
|
||
@NotNull | ||
@Getter | ||
private CanaryJudgeScore score; | ||
|
||
@NotNull | ||
@Getter | ||
private List<String> groups; | ||
|
||
@NotNull | ||
@Getter | ||
private Map<String, String> experimentMetrics; | ||
|
||
@NotNull | ||
@Getter | ||
private Map<String, String> controlMetrics; | ||
|
||
@NotNull | ||
@Getter | ||
private Map<String, String> resultMetrics; | ||
} |
37 changes: 37 additions & 0 deletions
37
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryJudgeGroupScore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2017 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryJudgeGroupScore { | ||
@NotNull | ||
@Getter | ||
private String name; | ||
|
||
@NotNull | ||
@Getter | ||
private CanaryJudgeScore score; | ||
} |
50 changes: 50 additions & 0 deletions
50
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryJudgeResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2017 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Singular; | ||
import lombok.ToString; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryJudgeResult { | ||
|
||
@NotNull | ||
@Getter | ||
private Map<String, CanaryAnalysisResult> results; | ||
|
||
@NotNull | ||
@Getter | ||
private List<CanaryJudgeGroupScore> groupScores; | ||
|
||
@NotNull | ||
@Getter | ||
private CanaryJudgeSummary summary; | ||
} | ||
|
42 changes: 42 additions & 0 deletions
42
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryJudgeScore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright 2017 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryJudgeScore { | ||
|
||
@NotNull | ||
@Getter | ||
private double score; | ||
|
||
@NotNull | ||
@Getter | ||
private String classification; | ||
|
||
@NotNull | ||
@Getter | ||
private String classificationReason; | ||
} |
45 changes: 45 additions & 0 deletions
45
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryJudgeSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2017 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.List; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryJudgeSummary { | ||
|
||
@NotNull | ||
@Getter | ||
private CanaryJudgeScore score; | ||
|
||
// Todo: (mgraff) This is only used for freemarker email reports, remove? | ||
@NotNull | ||
@Getter | ||
private List<CanaryJudgeSummaryClassification> classificationCounts; | ||
|
||
// Todo: (mgraff) This is only used for freemarker email reports, remove? | ||
@Getter | ||
private int metricCount; | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
kayenta-core/src/main/java/com/netflix/kayenta/canary/CanaryJudgeSummaryClassification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.netflix.kayenta.canary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Builder | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class CanaryJudgeSummaryClassification { | ||
|
||
@NotNull | ||
@Getter | ||
private String name; | ||
|
||
@Getter | ||
private int count; | ||
} |