Code Monkey home page Code Monkey logo

lighthouse-monitor's People

Contributors

andreas-pfuetze avatar dariye avatar larskumbier avatar maksimenko-stanislav avatar matti avatar y-ivanov-vx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lighthouse-monitor's Issues

Having trouble running on Windows

Getting a

npm run server

> [email protected] server C:\Users\fpsbi\Documents\lighthouse-monitor
> cross-env DEBUG=${DEBUG:-LIGHTMON*} ./bin/server

events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\Users\fpsbi\Documents\lighthouse-monitor\bin\sync-cache ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:464:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:464:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\Users\\fpsbi\\Documents\\lighthouse-monitor\\bin\\sync-cache',
  path: 'C:\\Users\\fpsbi\\Documents\\lighthouse-monitor\\bin\\sync-cache',
  spawnargs: [
    '--report-dir',
    'C:\\Users\\fpsbi\\AppData\\Local\\Temp\\lightmon',
    '--verbose'
  ]
}

In reports.js when I comment this block out it runs (but doesn't run a report or let me pick date. Just shows up at localhost:3000):

    _setupCacheSync(dir = this._baseDir) {
        this._watcher = spawn(path.join(__dirname, '..', 'bin', 'sync-cache'), ['--report-dir', dir, '--verbose'], {
            detached: false,
            stdio: ['pipe', 'inherit', 'inherit']
        })
        //this._watcher.stdout.on('data', (data) => debug('LIGHTMON:SYNC:INFO')(`${data.trim()}`))
        //this._watcher.stderr.on('data', (data) => debug('LIGHTMON:SYNC:ERROR')(`${data.trim()}`))
        this._watcher.on('close', (code) => {
            debug('LIGHTMON:WARNING')(`Sync childprocess exited with code ${code}`)
            if (this._watcherRestarts > 3) {
                throw new Error('I would have to restart the sync process for more than 3 times, something is wrong. Exiting.')
            }
            if (this._shouldRestartCacheSync) {
                this._watcherRestarts++
                debug('LIGHTMON:WARNING')('Restarting cache sync process...')
                this._setupCacheSync(dir)
            } else {
                debug('LIGHTMON:WARNING')('shouldRestartCacheSync is false - not restarting sync process.')
            }
        })
    }

Reduce startup time with high report count

The startup time of the server becomes very high (currently more than 15min), if there are many reports. This should be reduced.

The root cause is that we do not have a database, but use the filesystem directly. This has the advantage of having a single-source-of-truth and get around the need for synchronizing filesystem and a database (e.g. after deletion of files).

This might have to change now, because the startup times are getting too high.

As a first measure, we could run the loading of the files non-blocking and just return the results, that have been loaded so far. This would make results unaccessible, if they have not been loaded yet.

We could also add a cache file to be loaded and warm up the loading the of the files.

new relic sending broken

With #6 applied:

  LIGHTMON:INFO + Running preset desktop-fast +0ms
  LIGHTMON:WARN Could not send report to NewRelic - error was: StatusCodeError: 403 - {} +0ms

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.