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

[BTRACE-50] Lightweight fast profiling support - a cut down highly specialized aggregation #13

Closed
jbachorik opened this issue Aug 28, 2014 · 1 comment

Comments

@jbachorik
Copy link
Collaborator

[reporter="jbachorik", created="Wed, 25 Aug 2010 16:36:33 +0200", resolved="Wed, 25 Aug 2010 16:37:15 +0200"]

For the purposes of providing real-time performance metrics to the VisualVM Tracer it became necessary to have the infrastructure for capturing the method runtime metrics in very compact and efficient way.

Currently, an aggregation would be used to obtain such data. The problem is that at least 4 aggregations would be necessary to track invocation count, total time, min and max - this leading to huge performance impact. Not even mentioning that it is impossible to calculate a method self time (time spent within a method minus the time spent in the methods it called).
Because of this a new entity was created - a Profiler. Profiler basically tracks the enter/exit events to a particular code block and assigns the duration to it. It is aware of the call tree so it can calculate the self time as well as not counting the time spent in callees during recursive processing. A profiler can be exposed as a @Property as well as a snapshot can be made and printed via printSnapshot() method.

All the methods related to profiling are placed in BTraceUtils.Profiling namespace.

@jbachorik jbachorik added this to the release-1.2 milestone Aug 28, 2014
@jbachorik
Copy link
Collaborator Author

[author="jbachorik", created="Wed, 25 Aug 2010 16:37:15 +0200"]

http://kenai.com/projects/btrace/sources/hg/revision/368

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

1 participant