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

First view vs Second view #14

Closed
lafikl opened this issue Oct 16, 2014 · 6 comments
Closed

First view vs Second view #14

lafikl opened this issue Oct 16, 2014 · 6 comments

Comments

@lafikl
Copy link

lafikl commented Oct 16, 2014

Hi @tkadlec,
Does the plugin test for second view? And what's the rationale behind that?

@tkadlec
Copy link
Owner

tkadlec commented Oct 16, 2014

Hey @lafikl!

The plugin checks first view by default. Repeat view is available as an option that was added in the latest version.

I see the README never got updated though. :/ On that now....

@lafikl
Copy link
Author

lafikl commented Oct 16, 2014

Isn't there a mode for both?

@tkadlec
Copy link
Owner

tkadlec commented Oct 16, 2014

Sure. WPT definitely lets you get results back for both. At the moment, grunt-perfbudget is choosing between the two. The assumption (and maybe it's a faulty one) is that if you're setting a budget for repeat views, the budget is probably different (read more aggressive) than the budget you would use for an initial view.

I'm refactoring right now to pull the core into it's own module, which would open up Gulp access per #5. As part of that, I'm also rethinking the way perfbudget works and am thinking about if I should be doing something to provide the ability to run multiple tests (#10) and multiple budgets within the same set of options.

Is that what you would be looking for?

@lafikl
Copy link
Author

lafikl commented Oct 16, 2014

I'm interested in the subject because i'm also working on a full solution (it will be open-sourced soon) for performance budgets (Backed by WPT obviously).

How would you approach multiple budgets for the same url? For example testing on mobile needs a different budget.

@tkadlec
Copy link
Owner

tkadlec commented Oct 16, 2014

Gotcha.

At the moment, I set it up something like this:

home: {
    options: {
        url: 'http://mysite.com',
        connectivity: 'Cable',
                ...
        budget: {
            ...
        }
    }
},
home3G: {
    options: {
        url: 'http://mysite.com',
        connectivity: '3G',
                ...
        budget: {
            ...
        }
    }
}

The downside is you may end up with a fairly long list. The upside is you have a lot of flexibility for how and when you want to run them (I frequently run the budget as a standalone task to check in on things, for example).

Open to suggestions, of course!

@lafikl
Copy link
Author

lafikl commented Oct 17, 2014

Well, it's a very different solution because my solution is a web-based product.

If you're interested i can email you some screenshots!

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

No branches or pull requests

2 participants