Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClusterLoader - Adding api reposiveness prometheus to tests #493

Conversation

krzysied
Copy link
Contributor

  • Making api responsiveness measurement non-failable.
  • Addinf api responsiveness measurement to density and load test.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 11, 2019
@krzysied
Copy link
Contributor Author

/assign @wojtek-t

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 11, 2019
@@ -67,6 +67,12 @@ type apiResponsivenessMeasurementPrometheus struct {
func (a *apiResponsivenessMeasurementPrometheus) Execute(config *measurement.MeasurementConfig) ([]measurement.Summary, error) {
var summaries []measurement.Summary

if config.PrometheusFramework == nil {
klog.Errorf("%s: prometheus framework is not provided!")
// TODO(krzysied): for the testing purpose metric is not returning error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of TODO(krzysied), please open an issue and do TODO(#issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

return metrics, errors.NewMetricViolationError("top latency metric", fmt.Sprintf("there should be no high-latency requests, but: %v", badMetrics))
}
return metrics, nil
// TODO(krzysied): For testing purpose this metric will never return metric violation error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@krzysied krzysied force-pushed the cluster_loader_api_reposiveness_prometheus_nonblocking branch from d4b6732 to 0d07406 Compare April 15, 2019 09:19
// TODO(#498): For testing purpose this metric will never return metric violation error.
// The code below should be
// if len(badMetrics) > 0 {
// return metrics, errors.NewMetricViolationError("top latency metric", fmt.Sprintf("there should be no high-latency requests, but: %v", badMetrics))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apiResponsivenessPrometheus{metric}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- Identifier: APIResponsivenessPrometheus
Method: APIResponsivenessPrometheus
Params:
action: start
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're getting to the point when it makes sense to introduce the "slo bundle" metric. Soon we will have network-programming latency SLI in this categoy, and more is comming - I don't want to grows those configs that much.
Probably a separate PR though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create separate PR.

@krzysied krzysied force-pushed the cluster_loader_api_reposiveness_prometheus_nonblocking branch from 0d07406 to a1ae777 Compare April 15, 2019 09:37
}

// SummaryTime returns time when summary was created.
func (a *apiResponsivenessPrometheus) SummaryTime() time.Time {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with all other metrics - can you move it above PrintSummary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@krzysied krzysied force-pushed the cluster_loader_api_reposiveness_prometheus_nonblocking branch from a1ae777 to a6cae43 Compare April 15, 2019 11:07
@wojtek-t
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 15, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: krzysied, wojtek-t

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 477754e into kubernetes:master Apr 15, 2019
@krzysied krzysied deleted the cluster_loader_api_reposiveness_prometheus_nonblocking branch April 16, 2019 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants