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
spine add stats and ES6 refactor #1014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! just some minor comments
erizo_controller/erizoClient | ||
spine/erizofc.js | ||
erizo_controller/erizoClient/**/*.js | ||
spine/**/*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to remove spine from the folders that jshint inspect (in package.json).
In any case, we should run eslint for spine then. Otherwise, we will stop checking this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It helps when you have an editor configured with both eslint and jshint.
The idea is to create a gulp task or similar in spine to lint it, will do in a future PR.
spine/.jshintignore
Outdated
@@ -0,0 +1 @@ | |||
./**/*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above. Anyway, do we need it?
Erizo = require('./erizofc'), | ||
NativeStream = require ('./NativeStream.js'), | ||
NativeStack = require ('./NativeStack.js'); | ||
const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // eslint-disable-line import/no-extraneous-dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a package.json in spine in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should, i'd do it when we create a package.json for each of the parts of licode.
publishConfig: streamConfig.publishConfig, | ||
serverUrl: streamConfig.basicExampleUrl | ||
}; | ||
streamConfig = require(`./${streamConfig}`); // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are other ways to read the config file better than require, we can fix it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
spine/simpleNativeConnection.js
Outdated
if (stream.pc && stream.pc.peerConnection && stream.pc.peerConnection.connected) { | ||
promises.push(stream.pc.peerConnection.getStats()); | ||
} else { | ||
log.info('No stream to ask for stats: ', streamId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.warn?
spine/NativeStack.js
Outdated
that.pcConfig.iceServers = configuration.iceServers; | ||
} | ||
|
||
if (configuration.audio === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider configuration.audio = configuration.audio || false
spine/NativeStack.js
Outdated
configuration.audio = false; | ||
} | ||
|
||
if (configuration.video === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider configuration.video = configuration.video || false
Description
This PR implements:
runSpineClients
.You can specify an array of stat keys, a stat gathering interval and total number of intervals in
spineClientsConfig.json
The result will be written to a file that can be specified as a command line parameter forrunSpineClients
. The result will always be the output from the last stats gathering.[] It needs and includes Unit Tests
Changes in Client or Server public APIs
[] It includes documentation for these changes in
/doc
.