1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

moved stats header to separate function

This commit is contained in:
Steffen Vogel 2015-08-22 17:38:21 +02:00
parent b42f1ca2ed
commit 9e44ecfa05
2 changed files with 8 additions and 4 deletions

View file

@ -158,15 +158,12 @@ int main(int argc, char *argv[])
/* Run! */
if (settings.stats > 0) {
info("%-32s : %-8s %-8s %-8s %-8s %-8s",
"Source " MAG("=>") " Destination", "#Sent", "#Recv", "#Drop", "#Skip", "#Inval");
line();
stats_header();
for (;;) FOREACH(&paths, it) {
usleep(settings.stats * 1e6);
hook_run(it->path, HOOK_PERIODIC);
}
}
else
pause();

View file

@ -12,6 +12,13 @@
#include "timing.h"
#include "utils.h"
void stats_header()
{
info("%-32s : %-8s %-8s %-8s %-8s %-8s",
"Source " MAG("=>") " Destination", "#Sent", "#Recv", "#Drop", "#Skip", "#Invalid");
line();
}
int stats_line(struct path *p)
{
char buf[33];