Skip to content

Commit

Permalink
Fix UDP_STREAM
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Talerico aka rook <[email protected]>
  • Loading branch information
jtaleric committed Sep 5, 2024
1 parent 133e2b9 commit 08c9654
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/drivers/netperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@ func (n *netperf) Run(c *kubernetes.Clientset, rc rest.Config, nc config.Config,
"-k", fmt.Sprint(omniOptions)}
var additionalOptions []string
if strings.Contains(nc.Profile, "STREAM") {
additionalOptions = []string {
"-m", fmt.Sprint(nc.MessageSize)}
if strings.Contains(nc.Profile, "UDP") {
additionalOptions = []string{
"-m", fmt.Sprint(nc.MessageSize),
"-R", "1"}
} else {
additionalOptions = []string{
"-m", fmt.Sprint(nc.MessageSize)}
}
} else {
additionalOptions = []string {
additionalOptions = []string{
"-r", fmt.Sprint(nc.MessageSize, ",", nc.MessageSize)}
if strings.Contains(nc.Profile, "TCP_RR") && (nc.Burst > 0) {
burst := []string {"-b", fmt.Sprint(nc.Burst)}
burst := []string{"-b", fmt.Sprint(nc.Burst)}
additionalOptions = append(additionalOptions, burst...)
}
}
Expand Down

0 comments on commit 08c9654

Please sign in to comment.