Skip to content

Commit

Permalink
iperf_server_api: start calculating CPU utilization right before TEST…
Browse files Browse the repository at this point in the history
…_START (esnet#1077)

Fixes issue 1076.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
  • Loading branch information
jtluka authored and hanvari committed Jul 3, 2021
1 parent 6834f61 commit 18ed675
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/iperf_server_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,6 @@ iperf_run_server(struct iperf_test *test)
return -2;
}

// Begin calculating CPU utilization
cpu_util(NULL);

test->state = IPERF_START;
send_streams_accepted = 0;
rec_streams_accepted = 0;
Expand Down Expand Up @@ -634,6 +631,9 @@ iperf_run_server(struct iperf_test *test)
return -1;
}

// Begin calculating CPU utilization
cpu_util(NULL);

if (iperf_set_send_state(test, TEST_START) != 0) {
cleanup_server(test);
return -1;
Expand Down

0 comments on commit 18ed675

Please sign in to comment.