#define FIELD_EXCLUSION_CHARACTER '^'
+
static void
myexp(double *acc, double val, unsigned *n, unsigned nmax)
{
do_curses(struct varnish_stats *VSL_stats, int delay, const char *fields)
{
struct varnish_stats copy;
+ struct varnish_stats seen;
intmax_t ju;
struct timeval tv;
double tt, lt, hit, miss, ratio, up;
int ch, line;
memset(©, 0, sizeof copy);
+ memset(&seen, 0, sizeof seen);
a1 = a2 = a3 = 0.0;
n1 = n2 = n3 = 0;
line = 3;
#define MAC_STAT(n, t, f, d) \
- if ((fields == NULL || show_field( #n, fields )) && ++line < LINES) { \
+ if ((fields == NULL || show_field( #n, fields )) && line < LINES) { \
ju = VSL_stats->n; \
- if (f == 'a') { \
+ if (ju == 0 && !seen.n) { \
+ } else if (f == 'a') { \
+ seen.n = 1; \
+ line++; \
mvprintw(line, 0, "%12ju %12.2f %12.2f %s\n", \
ju, (ju - (intmax_t)copy.n)/lt, ju / up, d); \
copy.n = ju; \
} else { \
+ seen.n = 1; \
+ line++; \
mvprintw(line, 0, "%12ju %12s %12s %s\n", \
ju, ". ", ". ", d); \
} \