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

slice time between children #14

Closed
hjdivad opened this issue Aug 12, 2016 · 2 comments
Closed

slice time between children #14

hjdivad opened this issue Aug 12, 2016 · 2 comments

Comments

@hjdivad
Copy link
Collaborator

hjdivad commented Aug 12, 2016

if parent a has children b, c we currently report three times

  • a selftime
  • b selftime
  • c selftime

but it is often interesting to know time (and other stats) of a separated between (0-b), (b-c), (c-end).

Seems like this could be done by utilizing a fix for #13

@hjdivad
Copy link
Collaborator Author

hjdivad commented Aug 16, 2016

It's worth noting that merely doing #15 handles this for times.

To get it for counters as well, we may want to do something like

  • leaf nodes only have counters
  • when a leaf node becomes an intermediate node, do a conversion that shifts the counters into a first child.

eg

heimdall.start('a');
heimdall.statsFor('x').foo++;  // a has stats
heimdall.start('b');
// at this point a no longer has stats, but has two children, a_0 who starts at a start and stops at b start.  a_0 has the stats that a used to have.

heimdall.stop('b');
// at this point there is now a_1 who starts when b stops and will stop when a stops
heimdall.statsFor('x').foo++;
heimdall.stop('a');

@runspired
Copy link
Collaborator

This landed as 0.3

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

No branches or pull requests

2 participants