Commit 19dd8df1 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

log: remove stats()

parent 8cf49c98
......@@ -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)));
......
......@@ -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)
......
......@@ -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;
......
......@@ -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);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment