This commit is contained in:
Daniel García Aubert 2019-09-16 13:08:10 +02:00
parent 738d10409f
commit f6c205baf9
2 changed files with 4 additions and 4 deletions

View File

@ -17,12 +17,12 @@ module.exports = class NamedMapProviderReporter {
stats.gauge(statKeyTemplate({ metric: 'named-map.count' }), cache.length);
const providers = cache.dump();
const namedMapIntantiations = providers.reduce((acc, { v: providers }) => {
const namedMapInstantiations = providers.reduce((acc, { v: providers }) => {
acc += Object.keys(providers).length;
return acc;
}, 0);
stats.gauge(statKeyTemplate({ metric: 'named-map.intantiation.count' }), namedMapIntantiations);
stats.gauge(statKeyTemplate({ metric: 'named-map.intantiation.count' }), namedMapInstantiations);
}, this.intervalInMilliseconds);
}

View File

@ -123,7 +123,7 @@ describe('named map cache regressions', function () {
const newQuery = 'select * from populated_places_simple_reduced limit 100';
templateUpdate.layergroup.analyses[0].params.query = newQuery;
const upateTemplateRequest = {
const updateTemplateRequest = {
url: `http://${address}/api/v1/map/named/${templateId}?api_key=${apiKey}`,
method: 'PUT',
headers: {
@ -134,7 +134,7 @@ describe('named map cache regressions', function () {
json: true
};
request(upateTemplateRequest, (err, res) => {
request(updateTemplateRequest, (err, res) => {
if (err) {
return done(err);
}