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:
parent
b42f1ca2ed
commit
9e44ecfa05
2 changed files with 8 additions and 4 deletions
|
@ -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();
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue