use function stats_reset_interval()

Git commit bb8d71ef27 from 2020 among many
other things introduced the function stats_reset_interval() to reset the
*_i interval (or split) host statistics, but did not use it.  This commit
replaces the open coded reset of interval stats inside print_host_splits()
and print_netdata() with calling stats_reset_interval().
pull/302/head
Erik Auerswald 10 months ago committed by David Schweikert
parent c138b08141
commit 266eb16568

@ -380,6 +380,7 @@ void usage(int);
int wait_for_reply(int64_t); int wait_for_reply(int64_t);
void print_per_system_stats(void); void print_per_system_stats(void);
void print_per_system_splits(void); void print_per_system_splits(void);
void stats_reset_interval(HOST_ENTRY *h);
void print_netdata(void); void print_netdata(void);
void print_global_stats(void); void print_global_stats(void);
void main_loop(); void main_loop();
@ -1738,7 +1739,7 @@ void print_netdata(void)
} }
printf("END\n"); printf("END\n");
h->num_sent_i = h->num_recv_i = h->max_reply_i = h->min_reply_i = h->total_time_i = 0; stats_reset_interval(h);
} }
sent_charts = 1; sent_charts = 1;
@ -1798,7 +1799,7 @@ void print_per_system_splits(void)
} }
fprintf(stderr, "\n"); fprintf(stderr, "\n");
h->num_sent_i = h->num_recv_i = h->max_reply_i = h->min_reply_i = h->total_time_i = 0; stats_reset_interval(h);
} }
} }

Loading…
Cancel
Save