verivox / lighthouse-monitor Goto Github PK
View Code? Open in Web Editor NEWInvestigate performance over your whole company with lighthouse
License: MIT License
Investigate performance over your whole company with lighthouse
License: MIT License
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.')
}
})
}
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.
With #6 applied:
LIGHTMON:INFO + Running preset desktop-fast +0ms
LIGHTMON:WARN Could not send report to NewRelic - error was: StatusCodeError: 403 - {} +0ms
Can u create dockerfile?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.