mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix: suppres statistic output if no samples have been received
This commit is contained in:
parent
9e44ecfa05
commit
755c3e93f4
2 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ struct hist {
|
|||
/** The number of buckets in #data. */
|
||||
int length;
|
||||
|
||||
/** Total number of counted values between #low and #high. */
|
||||
/** Total number of counted values. */
|
||||
hist_cnt_t total;
|
||||
/** The number of values which are higher than #high. */
|
||||
hist_cnt_t higher;
|
||||
|
|
|
@ -32,9 +32,9 @@ int stats_line(struct path *p)
|
|||
|
||||
int stats_show(struct path *p)
|
||||
{
|
||||
if (p->hist_delay.length) { info("One-way delay:"); hist_print(&p->hist_delay); }
|
||||
if (p->hist_gap.length) { info("Message gap time:"); hist_print(&p->hist_gap); }
|
||||
if (p->hist_sequence.length) { info("Sequence number gaps:"); hist_print(&p->hist_sequence); }
|
||||
if (p->hist_delay.total) { info("One-way delay:"); hist_print(&p->hist_delay); }
|
||||
if (p->hist_gap.total) { info("Message gap time:"); hist_print(&p->hist_gap); }
|
||||
if (p->hist_sequence.total) { info("Sequence number gaps:"); hist_print(&p->hist_sequence); }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue