How to use the gemini-core.Calibrator function in gemini-core

To help you get started, we’ve selected a few gemini-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gemini-testing / gemini / lib / browser-pool.js View on Github external
exports.create = function(config, emitter) {
    const calibrator = new Calibrator();

    const BrowserManager = {
        create: (id) => Browser.create(config.forBrowser(id)),

        start: (browser) => browser.launch(calibrator),
        onStart: (browser) => emitter.emitAndWait(Events.START_BROWSER, browser),

        onQuit: (browser) => emitter.emitAndWait(Events.STOP_BROWSER, browser),
        quit: (browser) => browser.quit()
    };

    const configAdapter = {
        forBrowser: (id) => {
            const browserConfig = config.forBrowser(id);
            return {
                parallelLimit: browserConfig.sessionsPerBrowser,
github gemini-testing / hermione / lib / worker / runner / browser-pool.js View on Github external
constructor(config, emitter) {
        this._config = config;
        this._emitter = emitter;

        this._browsers = {};

        this._calibrator = new Calibrator();
    }