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

User event questions #31

Open
jberryman opened this issue Oct 29, 2019 · 1 comment
Open

User event questions #31

jberryman opened this issue Oct 29, 2019 · 1 comment

Comments

@jberryman
Copy link

I hope this isn't spam but I have a few questions after reading the blog post and the README, and playing with this a little more:

  1. You write "[user START/STOP event] periods are completely independent of threads". Am I right that this means we can't just e.g. wrap a handler function HttpRequest -> IO JSON in traceEventIO "START/STOP mainHandlerFunc" and expect it to give sensible results (since STARTs and STOPs will be interleaved across threads, and ghc-events-analyze will pair a START from one thread with a STOP from a different one)?
  2. If so is this a usecase for "Event subscripts", where I could do above but hash the threadID and use that as a subscript, allowing us to correlate stops and starts?
  3. How should I understand how the tool behaves when there is nesting (START foo >> START bar >> STOP bar >> STOP foo)? It looks like that is supported but it's the users job to make note of when that's happening and what part of the time of an event should be attributed to a child event. I'm just interested in being able to use the same instrumentation to be able to get a more traditional profiling report as well, and I'm curious what you think about that (see also Chrome Trace Event support? #29)
@jberryman
Copy link
Author

To belatedly answer some of my own questions:

  • interleaved "START ... STOP" spans are collapsed (as expected?) in the "User Events" timeline, where I guess they have the meaning "an event is running on some thread"
  • using "subscripts" causes them to be shown separated in "User Events" timeline
  • nested "START ... STOP" spans that use subscripts generate separate User Event spans without trouble also; but there's no information associating these spans with each other or a particular entry in the "Thread Events" timeline

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

1 participant