Skip to content
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

Make Logging work better for Performance and Health Monitoring #1017

Closed
mollyling opened this issue Feb 27, 2015 · 6 comments
Closed

Make Logging work better for Performance and Health Monitoring #1017

mollyling opened this issue Feb 27, 2015 · 6 comments
Labels

Comments

@mollyling
Copy link
Collaborator

Currently, the logging system misses a few features that would help us make uProxy faster and more reliable.

First and foremost, many uProxy log messages don't show up in the text console log (e.g., --enable-logging). Instead, we get "%c RtcToNet", followed by source: chrome-extension://lots-of-unhelpful-text/fredom-for-chrome.js.

Life would be substantially better if we could capture logs to a file and grep for the messages that we care about.

Performance-wise, we could definitely use two other changes:

  • Buffer log messages into bursts to write out, reducing the system overhead.
  • Provide an api for us to test whether a log message is worth generating at all. Sometimes a log message, particularly one for performance tracing, can involve some work to generate. We may collect data, calculate averages, call chrome APIs, etc. It'd be nice if we could avoid that work altogether if the message isn't going to go anywhere
@mollyling
Copy link
Collaborator Author

Also, to support #1015, it'd be nice to easily let another component listen for certain kinds of log messages, so that a status-page component can monitor instrumentation data.

@trevj
Copy link
Contributor

trevj commented Feb 27, 2015

So, regarding your second point, I think this issue covers making src/logging/logging.ts skip (potentially expensive) logging if it's just gonna be discarded:
#1005

@trevj
Copy link
Contributor

trevj commented Feb 27, 2015

Oh! The logging provider in uproxy-lib already lets us query logs:
https://github.com/uProxy/uproxy-lib/blob/dev/src/loggingprovider/loggingprovider.ts

We don't use that feature today but I think it's what you're looking for?

@trevj
Copy link
Contributor

trevj commented Mar 2, 2015

It looks like @soycode is looking at the console issue here:
freedomjs/freedom#239

Right now, the logging provider will only store 1000 lines and this value is hard-coded:
https://github.com/uProxy/uproxy-lib/blob/dev/src/loggingprovider/loggingprovider.ts#L15

Its default is E so I guess it was intended only for capturing the worst errors, not profiling. @mollyling do you think it's worth adding a call to set that programmatically, e.g. setBufferedLogSize?

@iislucas
Copy link
Contributor

iislucas commented Mar 3, 2015

I think that's a good idea. (adding setBufferedLogSize).

@trevj trevj added the P1 label Mar 4, 2015
@iislucas iislucas modified the milestones: v-focus-2015-03-30 (beta launch), v-focus-2015-03-09 (into the hands) Mar 20, 2015
@iislucas iislucas added P2 and removed P1 labels Mar 20, 2015
@trevj
Copy link
Contributor

trevj commented Apr 7, 2015

I don't see what this issue is doing for us, given this more specific issue:
#1005

@trevj trevj closed this as completed Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants