-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add heapdump telemetry device #776
Add heapdump telemetry device #776
Conversation
With this commit we add a new telemetry device `heapdump` that allows users to capture a heapdump right before a node is shutdown. This can be useful together with `--on-error=abort` where we then want to know the state of the heap at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this useful addition. There's a small bug that needs fixing, but otherwise looks good.
esrally/telemetry.py
Outdated
def detach_from_node(self, node, running): | ||
if running: | ||
heap_dump_file = os.path.join(self.log_root, "heap_at_exit_{}.hprof".format(node.pid)) | ||
console.info("{}: Writing heap dump to [{}}]".format(self.human_name, heap_dump_file), logger=self.logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will error out as [{}]]
needs to be [{}]
. (Tests also fail)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've addressed it now in e44cbfe. Can you please have another look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With this commit we add a new telemetry device
heapdump
that allowsusers to capture a heapdump right before a node is shutdown. This can be
useful together with
--on-error=abort
where we then want to know thestate of the heap at this point.