new switch for fetching navtiming with phantomjs

This commit is contained in:
soulgalore 2014-08-26 22:42:37 +02:00
parent b90add6720
commit 73e0732706
3 changed files with 6 additions and 2 deletions

View File

@ -33,7 +33,7 @@ Analyzer.prototype.analyze = function(urls, collector, downloadErrors, analysisE
}
},
function(cb) {
if (config.runYslow) {
if (config.phantomjs) {
phantomjs.analyze(urls, cb);
} else {
cb(undefined, {});

View File

@ -30,7 +30,7 @@ module.exports = {
} else {
var queue = async.queue(phantomjs, config.threads);
var errors = {};
var pageData = {};
urls.forEach(function(u) {

View File

@ -265,6 +265,10 @@ config = require('nomnom').options({
flag: true,
help: 'Set to true to turn of collecting metrics using YSlow.',
},
phantomjs: {
flag: true,
help: 'Set to true to turn fetch Navigation Timing metrics using PhantomJS. Needs PhantomJS 2.0',
},
wptLocation: {
metavar: '<STRING>',
help: 'WebPageTest location, something like Dulles:Chrome ',