Fix golint failures of e2e/framework/p*.go
This fixes golint failures of - test/e2e/framework/perf_util.go - test/e2e/framework/pods.go - test/e2e/framework/profile_gatherer.go - test/e2e/framework/provider.go - test/e2e/framework/psp_util.go
This commit is contained in:
@@ -25,13 +25,13 @@ import (
|
||||
// TODO(random-liu): Change the tests to actually use PerfData from the beginning instead of
|
||||
// translating one to the other here.
|
||||
|
||||
// currentApiCallMetricsVersion is the current apicall performance metrics version. We should
|
||||
// currentAPICallMetricsVersion is the current apicall performance metrics version. We should
|
||||
// bump up the version each time we make incompatible change to the metrics.
|
||||
const currentApiCallMetricsVersion = "v1"
|
||||
const currentAPICallMetricsVersion = "v1"
|
||||
|
||||
// ApiCallToPerfData transforms APIResponsiveness to PerfData.
|
||||
func ApiCallToPerfData(apicalls *APIResponsiveness) *perftype.PerfData {
|
||||
perfData := &perftype.PerfData{Version: currentApiCallMetricsVersion}
|
||||
// APICallToPerfData transforms APIResponsiveness to PerfData.
|
||||
func APICallToPerfData(apicalls *APIResponsiveness) *perftype.PerfData {
|
||||
perfData := &perftype.PerfData{Version: currentAPICallMetricsVersion}
|
||||
for _, apicall := range apicalls.APICalls {
|
||||
item := perftype.DataItem{
|
||||
Data: map[string]float64{
|
||||
@@ -70,7 +70,7 @@ func latencyToPerfData(l LatencyMetric, name string) perftype.DataItem {
|
||||
|
||||
// PodStartupLatencyToPerfData transforms PodStartupLatency to PerfData.
|
||||
func PodStartupLatencyToPerfData(latency *PodStartupLatency) *perftype.PerfData {
|
||||
perfData := &perftype.PerfData{Version: currentApiCallMetricsVersion}
|
||||
perfData := &perftype.PerfData{Version: currentAPICallMetricsVersion}
|
||||
perfData.DataItems = append(perfData.DataItems, latencyToPerfData(latency.CreateToScheduleLatency, "create_to_schedule"))
|
||||
perfData.DataItems = append(perfData.DataItems, latencyToPerfData(latency.ScheduleToRunLatency, "schedule_to_run"))
|
||||
perfData.DataItems = append(perfData.DataItems, latencyToPerfData(latency.RunToWatchLatency, "run_to_watch"))
|
||||
|
Reference in New Issue
Block a user