diff --git a/pkg/netperf/netperf.go b/pkg/netperf/netperf.go index 21a1c3e9..a6d02355 100644 --- a/pkg/netperf/netperf.go +++ b/pkg/netperf/netperf.go @@ -94,6 +94,9 @@ func ParseResults(stdout *bytes.Buffer) (sample.Sample, error) { sample.Driver = workload send := 0.0 recv := 0.0 + if len(strings.Split(stdout.String(), "\n")) < 5 { + return sample, fmt.Errorf("Length of output from netperf was too short.") + } for _, line := range strings.Split(stdout.String(), "\n") { l := strings.Split(line, "=") if len(l) < 2 {