Skip to content

Commit

Permalink
store the list only on sitespeedio.render messages #1912 (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Feb 13, 2018
1 parent 50346c2 commit 57b76f6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/plugins/metrics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ module.exports = {
processMessage(message) {
const filterRegistry = this.filterRegistry;

if (message.type === 'sitespeedio.render')
if (this.options.list) {
// Ooops we should take care of promise
this.storageManager.writeData(
Object.keys(this.metrics).join('\n'),
'metrics.txt'
);
}
if (this.options.filterList) {
if (message.type === 'sitespeedio.render' && this.options.list) {
// Ooops we should take care of promise
this.storageManager.writeData(
Object.keys(this.metrics).join('\n'),
'metrics.txt'
);
}

if (message.type === 'sitespeedio.render' && this.options.filterList) {
let output = '';
let filtersByType = filterRegistry.getFilters();
for (let type of Object.keys(filtersByType)) {
Expand Down

0 comments on commit 57b76f6

Please sign in to comment.