add to logs even if no overviews tables were used.
{usesOverviews:false}
This commit is contained in:
parent
7c52f504e5
commit
95d179835c
@ -37,13 +37,16 @@ module.exports = class BaseDataview {
|
|||||||
//Overviews logging
|
//Overviews logging
|
||||||
const stats = {};
|
const stats = {};
|
||||||
|
|
||||||
if (flags && flags.usesOverviews) {
|
if (flags && flags.usesOverviews !== undefined) {
|
||||||
stats.usesOverviews = true;
|
stats.usesOverviews = flags.usesOverviews;
|
||||||
if (this.getType) {
|
} else {
|
||||||
stats.dataviewType = this.getType();
|
stats.usesOverviews = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getType) {
|
||||||
|
stats.dataviewType = this.getType();
|
||||||
|
}
|
||||||
|
|
||||||
return callback(null, result, stats);
|
return callback(null, result, stats);
|
||||||
}, true); // use read-only transaction
|
}, true); // use read-only transaction
|
||||||
});
|
});
|
||||||
|
@ -53,7 +53,7 @@ describe('dataviews using tables without overviews', function() {
|
|||||||
return done(err);
|
return done(err);
|
||||||
}
|
}
|
||||||
assert.deepEqual(formula_result, { operation: 'count', result: 7313, nulls: 0, type: 'formula' });
|
assert.deepEqual(formula_result, { operation: 'count', result: 7313, nulls: 0, type: 'formula' });
|
||||||
assert(getUsesOverviewsFromHeaders(headers) === undefined); //Overviews logging
|
assert(getUsesOverviewsFromHeaders(headers) === false); //Overviews logging
|
||||||
|
|
||||||
testClient.drain(done);
|
testClient.drain(done);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user