diff --git a/contrib/websocket/app.js b/contrib/websocket/app.js index 3f89869a7..19068e81b 100644 --- a/contrib/websocket/app.js +++ b/contrib/websocket/app.js @@ -145,10 +145,8 @@ function wsConnect(url, protocol) { plotData.push([]); // add data to arrays - for (var i = 0; i < msg.values; i++) { + for (var i = 0; i < msg.values; i++) plotData[i].push([msg.timestamp, msg.data[i]]); - console.log([msg.timestamp, msg.data[i]]); - } } }; }; diff --git a/lib/hooks.c b/lib/hooks.c index 0505d6fc6..ee84dbaae 100644 --- a/lib/hooks.c +++ b/lib/hooks.c @@ -375,11 +375,9 @@ int hook_stats(struct path *p, struct hook *h, int when) case HOOK_PRE: /* Exclude first message from statistics */ - if (p->received > 0) { - double gap = time_delta(&p->ts.last, &p->ts.recv); - - hist_put(&p->hist.gap_recv, gap); - } + if (p->received > 0) + hist_put(&p->hist.gap_recv, time_delta(&p->ts.last, &p->ts.recv)); + break; case HOOK_MSG: { struct msg *cur = pool_current(&p->pool); diff --git a/lib/path.c b/lib/path.c index e122cc438..88bab2090 100644 --- a/lib/path.c +++ b/lib/path.c @@ -37,7 +37,7 @@ int path_run_hook(struct path *p, enum hook_type t) list_foreach(struct hook *h, &p->hooks) { if (h->type & t) { - debug(22, "Running hook when=%u '%s' prio=%u ret=%d", t, h->name, h->priority, ret); + debug(22, "Running hook when=%u '%s' prio=%u", t, h->name, h->priority); ret = ((hook_cb_t) h->cb)(p, h, t); if (ret)