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

ekg doesn't complain when you don't give '+RTS -T' #4

Open
thoughtpolice opened this issue Feb 5, 2012 · 6 comments
Open

ekg doesn't complain when you don't give '+RTS -T' #4

thoughtpolice opened this issue Feb 5, 2012 · 6 comments

Comments

@thoughtpolice
Copy link
Contributor

If you start an application without enabling the statistics interface, the server doesn't really buy you much, nor does it inform you of the err.

It would be nice to throw up a warning, as I many times forget the -T, but unfortunately I don't know of an easy way to get at the +RTS options provided to your program. GHC apparently allows you to substitute your own main function at link-time, but I don't know if this can be done by a library. So it may require GHC hacking to provide some function in base that allows you to get at the +RTS flags.

@tibbe
Copy link
Collaborator

tibbe commented Feb 5, 2012

I think we can separate this issue into two parts:

  1. Make sure it's possible to know whether GC statistics is being collected or not.
  2. Warn the user if it's not.

If filed a bug for tracking (1): http://hackage.haskell.org/trac/ghc/ticket/5846

(2) should be simple except I don't want to e.g. print the warning to stderr, without giving the user an option to not have the message printed. Perhaps we could let the user specify this as an option when the server is started.

Note that ekg can also export lots of non-GC counters, so it's still useful even if the program isn't run with +RTS -T.

@thoughtpolice
Copy link
Contributor Author

Just to keep a note of this, GHC HEAD was recently modified to fix Trac #5846 in commit ghc/packages-base@05cf0016f - there's now a function to check for GC stats, and exceptions are thrown if they're not enabled. So these warnings can happen for 7.6 users at least.

@tibbe
Copy link
Collaborator

tibbe commented Jun 24, 2012

I saw that. So my current plan (once GHC 7.6 is out) is to not include the GC stats if they aren't available (i.e. +RTS -T wasn't used) and display a warning banner in the web UI. I will also update the API docs to say that the stats might not always be there.

@nh2
Copy link

nh2 commented Nov 6, 2013

If you start an application without enabling the statistics interface, the server doesn't really buy you much

It would be nice if this was mentioned somewhere on the Hackage page and in the Github Readme - I was wondering why all my graphs stay 0 until I found this issue.

@tibbe
Copy link
Collaborator

tibbe commented Nov 6, 2013

@nh2 It's documented here: http://hackage.haskell.org/package/ekg-0.3.1.3/docs/System-Remote-Monitoring.html#g:1

Perhaps the UI itself could detect the condition and show a warning.

@nh2
Copy link

nh2 commented Nov 6, 2013

Ah, there is the note - all right then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants