Open thoughtpolice opened 12 years ago
I think we can separate this issue into two parts:
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
.
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.
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.
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.
@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.
Ah, there is the note - all right then!
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 ownmain
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 inbase
that allows you to get at the+RTS
flags.