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

Fix func VerifyLatencyWithinThreshold() to local #85522

Merged
merged 1 commit into from Dec 11, 2019

Conversation

@YuikoTakada
Copy link
Contributor

YuikoTakada commented Nov 22, 2019

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

func VerifyLatencyWithinThreshold() is just used from test/e2e_node/density_test.go
this PR moves this func to test/e2e_node/density_test.go and also fixes it from global to local func.

Does this PR introduce a user-facing change?:

NONE
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 22, 2019

Hi @YuikoTakada. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

oomichi left a comment

/ok-to-test

Copy link
Member

oomichi left a comment

/cc @oomichi

return fmt.Errorf("too high %v latency 99th percentile: %v", metricName, actual.Perc99)
}
return nil
}

This comment has been minimized.

Copy link
@oomichi

oomichi Nov 28, 2019

Member

We need to use tabs instead of spaces for passing pull-kubernetes-verify job as

diff -u ./test/e2e_node/density_test.go.orig ./test/e2e_node/density_test.go
--- ./test/e2e_node/density_test.go.orig	2019-11-27 05:38:16.360037412 +0000
+++ ./test/e2e_node/density_test.go	2019-11-27 05:38:16.360037412 +0000
@@ -536,16 +536,16 @@
 // verifyLatencyWithinThreshold verifies whether 50, 90 and 99th percentiles of a latency metric are
 // within the expected threshold.
 func verifyLatencyWithinThreshold(threshold, actual e2emetrics.LatencyMetric, metricName string) error {
-        if actual.Perc50 > threshold.Perc50 {
-                return fmt.Errorf("too high %v latency 50th percentile: %v", metricName, actual.Perc50)
-        }
-        if actual.Perc90 > threshold.Perc90 {
-                return fmt.Errorf("too high %v latency 90th percentile: %v", metricName, actual.Perc90)
-        }
-        if actual.Perc99 > threshold.Perc99 {
-                return fmt.Errorf("too high %v latency 99th percentile: %v", metricName, actual.Perc99)
-        }
-        return nil
+	if actual.Perc50 > threshold.Perc50 {
+		return fmt.Errorf("too high %v latency 50th percentile: %v", metricName, actual.Perc50)
+	}
+	if actual.Perc90 > threshold.Perc90 {
+		return fmt.Errorf("too high %v latency 90th percentile: %v", metricName, actual.Perc90)
+	}
+	if actual.Perc99 > threshold.Perc99 {
+		return fmt.Errorf("too high %v latency 99th percentile: %v", metricName, actual.Perc99)
+	}
+	return nil
 }
@k8s-ci-robot k8s-ci-robot requested a review from oomichi Nov 28, 2019
@YuikoTakada YuikoTakada force-pushed the YuikoTakada:local-latencies branch from ea5422b to cd78599 Dec 3, 2019
@oomichi

This comment has been minimized.

Copy link
Member

oomichi commented Dec 8, 2019

@YuikoTakada This looks good to me, are there any reasons to keep this WIP?
WIP title blocks merger to the master branch.

@oomichi

This comment has been minimized.

Copy link
Member

oomichi commented Dec 8, 2019

/retest

@oomichi

This comment has been minimized.

Copy link
Member

oomichi commented Dec 11, 2019

/retitle Fix func VerifyLatencyWithinThreshold() to local

@k8s-ci-robot k8s-ci-robot changed the title WIP: Fix func VerifyLatencyWithinThreshold() to local Fix func VerifyLatencyWithinThreshold() to local Dec 11, 2019
@oomichi

This comment has been minimized.

Copy link
Member

oomichi commented Dec 11, 2019

/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oomichi, YuikoTakada

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 b38dfb3 into kubernetes:master Dec 11, 2019
15 of 16 checks passed
15 of 16 checks passed
tide Not mergeable. Retesting: pull-kubernetes-kubemark-e2e-gce-big
Details
cla/linuxfoundation YuikoTakada authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-kind-ipv6 Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.