New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config file not working #48
Comments
Do you use latest version (1.2.4) or master? API you wanna use is in master branch and it hasn't been release yet. Tips:
E.g. const PWmetrics = require('pwmetrics');
const perfConfig = require('path-to-my-config/config.js');
....
function runPerf(url, cb){
const pwmetrics = new PWmetrics(url, pwmetricsConfig);
pwmetrics.start().then(cd);
}
module.exports = {
//flags - the place where cli options can be put
flags: {
expectations: true,
runs: 5
},
sheets: {
// sheets configuration
},
expectations: {
ttfmp: {
warn: '>=3000',
error: '>=5000',
},
tti: {
warn: '>=5000',
error: '>=15000',
},
ttfcp: {
warn: '>=1500',
error: '>=3000',
},
psi: {
warn: '>=3000',
error: '>=6000',
},
},
}; |
Thank you for the reply! I am running the latest version from npm (1.2.4) I will try it out tomorrow and report back but my use case requires that I use the cli version because I want to create a child process for running pwmetrics (in essence I want to deploy an express server and run pwmetrics on it, all in one go). If this is not possible with the cli, I'll try the library and create an external script which I'll call from my cp.exec call though I don't find that a good solution either... Appreciate the help @denar90 :) |
@pedro93 feel free to reopen it. |
I am trying to create a configuration file to use with pwmetrics however it is not being used by the library. I have a file performance-test.config.js that looks like this:
I'm executing pwmetrics like this:
I think the issue is with how the cli reads the options from the command line. Is there an option to override every command line option with the data from a json?
The text was updated successfully, but these errors were encountered: