Fix minor typing errors
This CL fixes small typos and rephrases some sentences to make
them clearer
Change-Id: Ie3c07ac8e3ac005ad92eb48652af23ba99a5b567
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/21150
Reviewed-by: Dexter Rivera <riverade@google.com>
Tested-by: Dexter Rivera <riverade@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
diff --git a/src/pkg/nodeprofiler/profiler/components.go b/src/pkg/nodeprofiler/profiler/components.go
index 0097d4b..2fdb23d 100644
--- a/src/pkg/nodeprofiler/profiler/components.go
+++ b/src/pkg/nodeprofiler/profiler/components.go
@@ -542,8 +542,8 @@
return fmt.Errorf("failed to find the device %q", s.devices[i])
}
}
- utiil := (float64(fUsed) / float64(fSize)) * 100
- fsUtilization := math.Round((utiil)*100) / 100
+ util := (float64(fUsed) / float64(fSize)) * 100
+ fsUtilization := math.Round((util)*100) / 100
s.metrics.Utilization = fsUtilization
return nil
diff --git a/src/pkg/nodeprofiler/profilertest/profiler_e2e_test.go b/src/pkg/nodeprofiler/profilertest/profiler_e2e_test.go
index 97df569..129df21 100644
--- a/src/pkg/nodeprofiler/profilertest/profiler_e2e_test.go
+++ b/src/pkg/nodeprofiler/profilertest/profiler_e2e_test.go
@@ -12,19 +12,19 @@
"cos.googlesource.com/cos/tools.git/src/pkg/nodeprofiler/profiler"
)
-// TestCPUOverload tests whether the CPU's CollectUSEMetrics in package profiler
-// is working or not. It does this by overloading the CPU component using the
+// TestCPUOverload tests whether package profiler is able to collect USEMetrics
+// for the CPU component. It does this by overloading the CPU component using the
// "stress-ng" package upto a certain threshold and checking whether this was
// reflected in the component's metrics. The flags specificed to the shell command
// "stress-ng" include:
-// --cpu N: specifies the computer system the stress test is will be applied
-// on - the CPU and specifcally, N number of cores
+// --cpu N: specifies the component the stress test will be applied on - the
+// CPU and specifcally, N number of cores
// --cpu-load P: load CPU with P percent loading for the stress workers to
// set an approximate threshold on expetected utilization
// --fork N: continually fork child processes that exit to increase wait time
// for processes and thus make saturation true
// -v: (verbose) show all debug, warnings and normal information output
-// -t N: stop stress after N units of time (also specified in N)
+// // -t N: stop stress after N units of time (also specified in N)
func TestCPUOverload(t *testing.T) {
// initialize all commands needed and the cpu component
titles := []string{"r", "us", "sy", "st"}
diff --git a/src/pkg/nodeprofiler/utils/utils.go b/src/pkg/nodeprofiler/utils/utils.go
index 403b8e5..debfc5f 100644
--- a/src/pkg/nodeprofiler/utils/utils.go
+++ b/src/pkg/nodeprofiler/utils/utils.go
@@ -18,7 +18,7 @@
log.Infof("running %q", str)
out, err := exec.Command(cmd, args...).CombinedOutput()
if err != nil {
- return nil, fmt.Errorf("failed to run %q': %v", str, err)
+ return nil, fmt.Errorf("failed to run %q: %v", str, err)
}
log.Infof("finished running %q command successfully", str)
return out, nil