Add query duration Fixes #76

This commit is contained in:
mmorrison 2018-01-31 00:34:11 -06:00
parent e3bda42144
commit 2cf975b9f6

View file

@ -71,6 +71,8 @@ class Core extends EventEmitter {
state.query.type = this.type; state.query.type = this.type;
if('pretty' in this) state.query.pretty = this.pretty; if('pretty' in this) state.query.pretty = this.pretty;
state.duration = Date.now() - this.startMillis;
this.reset(); this.reset();
this.finished = true; this.finished = true;
this.emit('finished',state); this.emit('finished',state);
@ -98,6 +100,8 @@ class Core extends EventEmitter {
const options = this.options; const options = this.options;
this.reset(); this.reset();
this.startMillis = Date.now();
async.series([ async.series([
(c) => { (c) => {
// resolve host names // resolve host names