Skip to content

Commit

Permalink
Merge pull request #221 from pspacek/fix-latency-init
Browse files Browse the repository at this point in the history
Fix first call to diff_stats
  • Loading branch information
jelu authored Feb 1, 2023
2 parents b18e26c + 64b8c6d commit 5f833aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/dnsperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,9 +1249,9 @@ static void*
do_interval_stats(void* arg)
{
threadinfo_t* tinfo;
stats_t total;
stats_t last;
stats_t diff;
stats_t total = {};
stats_t last = {};
stats_t diff = {};
uint64_t now;
uint64_t last_interval_time;
uint64_t interval_time;
Expand All @@ -1260,7 +1260,6 @@ do_interval_stats(void* arg)

tinfo = arg;
last_interval_time = tinfo->times->start_time;
memset(&last, 0, sizeof(last));

wait_for_start();
while (perf_os_waituntilreadable(&sock, threadpipe[0],
Expand Down

0 comments on commit 5f833aa

Please sign in to comment.