fix golint error in e2e/node
This commit is contained in:
@@ -102,7 +102,7 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
|
||||
gomega.Expect(result.Stdout).NotTo(gomega.ContainSubstring("node-problem-detector.service: Failed"))
|
||||
|
||||
if isStandaloneMode[host] {
|
||||
cpuUsage, uptime := getCpuStat(f, host)
|
||||
cpuUsage, uptime := getCPUStat(f, host)
|
||||
cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
|
||||
uptimeStats[host] = append(uptimeStats[host], uptime)
|
||||
}
|
||||
@@ -138,7 +138,7 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
|
||||
rssStats[host] = append(rssStats[host], rss)
|
||||
workingSetStats[host] = append(workingSetStats[host], workingSet)
|
||||
if i == numIterations {
|
||||
cpuUsage, uptime := getCpuStat(f, host)
|
||||
cpuUsage, uptime := getCPUStat(f, host)
|
||||
cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
|
||||
uptimeStats[host] = append(uptimeStats[host], uptime)
|
||||
}
|
||||
@@ -249,7 +249,7 @@ func getMemoryStat(f *framework.Framework, host string) (rss, workingSet float64
|
||||
return
|
||||
}
|
||||
|
||||
func getCpuStat(f *framework.Framework, host string) (usage, uptime float64) {
|
||||
func getCPUStat(f *framework.Framework, host string) (usage, uptime float64) {
|
||||
cpuCmd := "cat /sys/fs/cgroup/cpu/system.slice/node-problem-detector.service/cpuacct.usage && cat /proc/uptime | awk '{print $1}'"
|
||||
result, err := e2essh.SSH(cpuCmd, host, framework.TestContext.Provider)
|
||||
framework.ExpectNoError(err)
|
||||
|
Reference in New Issue
Block a user