Skip to content
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

Extend API data returned in by pwmetrics #188

Open
denar90 opened this issue Aug 31, 2018 · 1 comment
Open

Extend API data returned in by pwmetrics #188

denar90 opened this issue Aug 31, 2018 · 1 comment

Comments

@denar90
Copy link
Collaborator

denar90 commented Aug 31, 2018

After starting PWMertrics run, users are able to get data adapted and retrieved from Lighthouse.
What if users might need to process expectations vs real results?
Should we extend API with returned data included expectations mixed with real metrics values?

@denar90
Copy link
Collaborator Author

denar90 commented Sep 8, 2018

I've asked on twitter and couple people were interested. Other than that I think it will be handy to handle expectation erros manyally, probably stop CI process (since we don't throw exeption if expectations failed) or do smth other.

So I propose to extend object with result data and have smth like this:

'runs': [
    {
      'timings': [
        {
          'title': 'First Contentful Paint',
          'id': 'firstContentfulPaint',
          'timing': 3389,
          'color': 'green',
          'expectations': { // might be empty if not specified
            'timings': {
              'warn': '>=1500',
              'error': '>=2000'
            },
            'result': {
              'warn': true,
              'error': false,
            }
          }
        },
....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant