Coder Social home page Coder Social logo

Comments (2)

connorjclark avatar connorjclark commented on June 12, 2024

I believe we landed on this because it avoided landing a non-reversible change to the gatherer implementation that affects filtering, which is already kinda complex. But this doesn't help for custom gatherers.

We also have --disable-full-page-screenshot to exclude this logic for the FPS audit ... so a gatherer option called alwaysRun: true would be more like alwaysRunUnlessToldOtherwise :p Maybe runOnlyWhenRequested or runOnlyIfNeeded: false or supplementary: true ...

Is it an option for you to always include (via --only-audits) a hidden audit that depends on your custom artifact?

from lighthouse.

alenaksu avatar alenaksu commented on June 12, 2024

Yeah that's a valid point, adding such new property might end up making things even more complex.

In regards to the hidden audit, yes, that's what I tried when I found out that gatherers are filtered.

At first, I didn't get why it was not working, then I realised I needed to include the gatherer in an audit. So I implemented a fake audit, like the one in the example below, but I felt like it was not the best way to do it and I was wondering whether could be feasible to, in a way, decouple gatherers from audits.

class MyAudit extends Audit {
    static get meta() {
        return {
            id: 'my-audit',
            title: 'My Audit',
            failureTitle: 'Dummy failure title',
            description: 'Dummy description',
            requiredArtifacts: ['MyGatherer'],
        };
    }

    static audit() {
        return {
            score: 1
        };
    }
}

Thanks for your feedback, happy to discuss this further but feel free to close the issue.

from lighthouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.