log layer id when benchmarking
This commit is contained in:
parent
dc798c0e07
commit
a21a195f1b
@ -129,7 +129,7 @@ if (ext == '.mml') {
|
||||
}, compile);
|
||||
} else if (ext == '.mss') {
|
||||
var env = _({}).defaults({
|
||||
benchmark: false,
|
||||
benchmark: options.benchmark,
|
||||
validation_data: false,
|
||||
effects: []
|
||||
});
|
||||
@ -145,7 +145,12 @@ if (ext == '.mml') {
|
||||
output.push(style.toXML(env));
|
||||
}
|
||||
});
|
||||
console.log(output.join('\n'));
|
||||
if (!options.benchmark) {
|
||||
util.puts(output.join('\n'));
|
||||
} else {
|
||||
var duration = (+new Date) - start;
|
||||
console.log('TOTAL: ' + (duration) + 'ms');
|
||||
}
|
||||
} else {
|
||||
util.puts("carto: please pass either a .mml file or .mss file");
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ carto.Renderer.prototype.render = function render(m, callback) {
|
||||
// Iterate through layers and create styles custom-built
|
||||
// for each of them, and apply those styles to the layers.
|
||||
m.Layer.forEach(function(l) {
|
||||
if (env.benchmark) console.warn('processing layer: ' + l.id);
|
||||
l.styles = [];
|
||||
// Classes are given as space-separated alphanumeric strings.
|
||||
var classes = (l['class'] || '').split(/\s+/g);
|
||||
|
Loading…
Reference in New Issue
Block a user