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

log: remove stats()

This commit is contained in:
Steffen Vogel 2019-01-22 16:00:20 +01:00
parent 4cee380858
commit 5fe159de0a
4 changed files with 13 additions and 34 deletions

View file

@ -93,10 +93,6 @@ void info(const char *fmt, ...)
void warning(const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)));
/** Printf alike statistics message. */
void stats(const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)));
/** Print error and exit. */
void error(const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)));

View file

@ -139,24 +139,24 @@ void hist_print(const struct hist *h, int details)
if (h->total > 0) {
hist_cnt_t missed = h->total - h->higher - h->lower;
stats("Counted values: %ju (%ju between %f and %f)", h->total, missed, h->low, h->high);
stats("Highest: %g", h->highest);
stats("Lowest: %g", h->lowest);
stats("Mu: %g", hist_mean(h));
stats("1/Mu: %g", 1.0/hist_mean(h));
stats("Variance: %g", hist_var(h));
stats("Stddev: %g", hist_stddev(h));
info("Counted values: %ju (%ju between %f and %f)", h->total, missed, h->low, h->high);
info("Highest: %g", h->highest);
info("Lowest: %g", h->lowest);
info("Mu: %g", hist_mean(h));
info("1/Mu: %g", 1.0/hist_mean(h));
info("Variance: %g", hist_var(h));
info("Stddev: %g", hist_stddev(h));
if (details > 0 && h->total - h->higher - h->lower > 0) {
char *buf = hist_dump(h);
stats("Matlab: %s", buf);
info("Matlab: %s", buf);
free(buf);
hist_plot(h);
}
}
else
stats("Counted values: %ju", h->total);
info("Counted values: %ju", h->total);
}
void hist_plot(const struct hist *h)

View file

@ -88,23 +88,6 @@ void warning(const char *fmt, ...)
free(buf);
}
void stats(const char *fmt, ...)
{
va_list ap;
char *buf;
va_start(ap, fmt);
vasprintf(&buf, fmt, ap);
va_end(ap);
Logger logger = logging.get("default");
logger->info(buf);
free(buf);
}
void error(const char *fmt, ...)
{
va_list ap;

View file

@ -107,9 +107,9 @@ void table_header(struct table *t)
}
stats("%s", line0);
stats("%s", line1);
stats("%s", line2);
stats("%s", line3);
info("%s", line1);
info("%s", line2);
info("%s", line3);
free(line0);
free(line1);
@ -167,6 +167,6 @@ void table_footer(struct table *t)
strcatf(&line, "%s", BOX_ULR);
}
stats("%s", line);
info("%s", line);
free(line);
}