-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install and doc changes needed to introduce builtin metrics (#750)
* install and doc changes needed to introduce builtin metrics Signed-off-by: Srinivasan Parthasarathy <[email protected]> * adding metrics task description Signed-off-by: Srinivasan Parthasarathy <[email protected]>
- Loading branch information
Showing
23 changed files
with
353 additions
and
140 deletions.
There are no files selected for viewing
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,7 @@ | ||
namespace: iter8-system | ||
|
||
commonLabels: | ||
creator: iter8 | ||
|
||
resources: | ||
- metrics.yaml |
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,107 @@ | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: request-count | ||
spec: | ||
description: Number of requests (Iter8 builtin metric) | ||
type: Counter | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: error-count | ||
spec: | ||
description: Number of responses with HTTP status code 4xx or 5xx (Iter8 builtin metric) | ||
type: Counter | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: error-rate | ||
spec: | ||
description: Fraction of responses with HTTP status code 4xx or 5xx (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: mean-latency | ||
spec: | ||
description: Mean latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: latency-50th-percentile | ||
spec: | ||
description: 50th percentile (median) latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: latency-75th-percentile | ||
spec: | ||
description: 75th percentile latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: latency-90th-percentile | ||
spec: | ||
description: 90th percentile latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: latency-95th-percentile | ||
spec: | ||
description: 95th percentile latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
apiVersion: iter8.tools/v2alpha2 | ||
kind: Metric | ||
metadata: | ||
name: latency-99th-percentile | ||
spec: | ||
description: 99th percentile latency (Iter8 builtin metric) | ||
type: Gauge | ||
sampleSize: iter8-system/request-count | ||
provider: iter8 | ||
jqExpression: "dummy" | ||
urlTemplate: https://iter8.tools | ||
--- | ||
|
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,31 @@ | ||
--- | ||
template: main.html | ||
--- | ||
|
||
# Builtin Metrics | ||
|
||
!!! tip "Builtin latency/error metrics" | ||
Iter8 ships with a set of nine builtin metrics that measure your app/ML model's performance in terms of latency and errors. You can collect and use these metrics in experiments without the need to configure any external databases. | ||
|
||
This feature enables you to get started with Iter8 experiments, especially, SLO validation experiments, quickly. | ||
|
||
## List of builtin metrics | ||
The following are the set of builtin Iter8 metrics. | ||
|
||
| Namespace | Name | Type | Description | | ||
| ----- | ------------ | ----------- | -------- | | ||
| iter8-system | request-count | Counter | Number of requests | | ||
| iter8-system | error-count | Gauge | Number of responses with HTTP status code 4xx or 5xx | | ||
| iter8-system | error-rate | Gauge | Fraction of responses with HTTP status code 4xx or 5xx | | ||
| iter8-system | mean-latency | Gauge | Mean response latency | | ||
| iter8-system | latency-50th-percentile | Gauge | 50th percentile (median) response latency | | ||
| iter8-system | latency-75th-percentile | Gauge | 75th percentile response latency | | ||
| iter8-system | latency-90th-percentile | Gauge | 90th percentile response latency | | ||
| iter8-system | latency-95th-percentile | Gauge | 95th percentile response latency | | ||
| iter8-system | latency-99th-percentile | Gauge | 99th percentile response latency | | ||
|
||
## Collecting builtin metrics | ||
Use the [`metrics/collect` task](../../reference/tasks/metrics/) in an experiment to collect builtin metrics for your app/ML model versions. | ||
|
||
## Example | ||
For an example of an experiment that uses builtin metrics, look inside the Knative experiment in [this tutorial](../../tutorials/testing-patterns/conformance/#7-launch-experiment). |
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
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
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 |
---|---|---|
|
@@ -109,7 +109,7 @@ Standard Kubernetes [meta.v1/ObjectMeta](https://kubernetes.io/docs/reference/ge | |
| ----- | ---- | ----------- | -------- | | ||
| testingPattern | string | Determines the logic used to evaluate the app versions and determine the winner of the experiment. Iter8 supports two testing patterns, namely, `Canary` and `Conformance`. | Yes | | ||
| deploymentPattern | string | Determines if and how traffic is shifted during an experiment. This field is relevant only for experiments using the `Canary` testing pattern. Iter8 supports two deployment patterns, namely, `Progressive` and `FixedSplit`. | No | | ||
| actions | map[string][][TaskSpec](#taskspec) | An action is a sequence of tasks that can be executed by Iter8. `spec.strategy.actions` can be used to specify start and finish actions that will be run at the start and end of an experiment respectively. | No | | ||
| actions | map[ActionType][][TaskSpec](#taskspec) | An action is a sequence of tasks that can be executed by Iter8. `ActionType` is a string enum with three valid values: `start`, `loop`, and `finish`. The start action, if specified, is executed at the start of the experiment. The loop action, if specified, is executed during every loop of the experiment, after all the iterations within the loop have completed. The finish action, if specified, is executed at the end of the experiment after all the loops have completed. The `actions` field is used to specify all three types of actions. | No | | ||
|
||
### TaskSpec | ||
|
||
|
@@ -155,8 +155,11 @@ Standard Kubernetes [meta.v1/ObjectMeta](https://kubernetes.io/docs/reference/ge | |
|
||
| Field name | Field type | Description | Required | | ||
| ----- | ---- | ----------- | -------- | | ||
| maxLoops | int32 | Maximum number of loops in the experiment. In case of a failure, the experiment may be terminated earlier. Default value = 1. | No | | ||
| iterationsPerLoop | int32 | Number of iterations *per experiment loop*. In case of a failure, the experiment may be terminated earlier. Default value = 15. | No | | ||
| intervalSeconds | int32 | Duration of a single iteration of the experiment in seconds. Default value = 20 seconds. | No | | ||
| maxIterations | int32 | Maximum number of iterations in the experiment. In case of failure, the experiment may be terminated earlier. Default value = 15. | No | | ||
|
||
> *Note*: Suppose an experiment has `maxLoops = x`, `iterationsPerLoop = y`, and `intervalSeconds = z`. Assuming the experiment does not terminate early due to failures, it would take a minimum of `x*y*z` seconds to complete. The actual duration may be more due to additional time incurred in [acquiring the target](#spec), and executing the `start`, `loop` and `finish` [actions](#strategy). | ||
### VersionInfo | ||
|
||
|
@@ -206,11 +209,22 @@ Standard Kubernetes [meta.v1/ObjectMeta](https://kubernetes.io/docs/reference/ge | |
|
||
| Field name | Field type | Description | Required | | ||
| ----- | ------------ | ----------- | -------- | | ||
| aggregatedBuiltinHists | [AggregatedBuiltinHists](#aggregatedbuiltinhists) | This field is used to store intermediate results from the [`metrics/collect` task](../tasks/metrics/#metrics-tasks) that enables [builtin metrics](../../metrics/builtin/). Reserved for Iter8 internal use. | No | | ||
| aggregatedMetrics | [AggregatedMetricsAnalysis](#aggregatedmetricsanalysis) | Most recently observed metric values for all metrics referenced in the experiment criteria. | No | | ||
| winnerAssessment | [WinnerAssessmentAnalysis](#winnerassessmentanalysis) | Information about the `winner` of the experiment. | No | | ||
| versionAssessments | [VersionAssessmentAnalysis](#versionassessmentanalysis) | For each version, a summary analysis identifying whether or not the version is satisfying the experiment criteria. | No | | ||
| weights | [WeightsAnalysis](#weightanalysis) | Recommended weight distribution to be applied before the next iteration of the experiment. | No | | ||
|
||
### AggregatedBuiltinHists | ||
|
||
| Field name | Field type | Description | Required | | ||
| ----- | ------------ | ----------- | -------- | | ||
| provenance | string | Source of the data. Currently, Iter8 builtin metrics collect task is the only valid value for this field. Reserved for Iter8 internal use. | Yes | | ||
| timestamp | [metav1.Time](https://pkg.go.dev/k8s.io/[email protected]/pkg/apis/meta/v1#Time) | The time when this field was last updated. Reserved for Iter8 internal use. | Yes | | ||
| message | string | Human readable message. Reserved for Iter8 internal use. | No | | ||
| data | [apiextensionsv1.JSON](https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1#JSON) | Aggregated histogram data for storing intermediate results for builtin metics collection. Reserved for Iter8 internal use. | No | | ||
|
||
|
||
### VersionAssessmentAnalysis | ||
|
||
| Field name | Field type | Description | Required | | ||
|
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
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
Oops, something went wrong.