Add query duration Fixes #76

This commit is contained in:
mmorrison 2018-01-31 00:34:11 -06:00
parent e3bda42144
commit 2cf975b9f6
1 changed files with 4 additions and 0 deletions

View File

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