Skip to content

Added heap used and total heap statistics.#35

Open
amit777 wants to merge 15 commits intoyahoo:masterfrom
amit777:master
Open

Added heap used and total heap statistics.#35
amit777 wants to merge 15 commits intoyahoo:masterfrom
amit777:master

Conversation

@amit777
Copy link

@amit777 amit777 commented Apr 28, 2016

I also clarified the definition of the "mem" attribute to be the ratio of heap used to total heap.

@yahoocla
Copy link

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄

@amit777
Copy link
Author

amit777 commented Apr 28, 2016

H, I have completed the CLA. I'm not sure if I need to resubmit this pull request or if it will automatically detect the signed CLA now.

@davglass
Copy link

It should pick it up, no need to add another PR :)

@yahoocla
Copy link

CLA is valid!


stats_.pmem_ = (v8stats.used_heap_size() / (double) v8stats.total_heap_size());
stats_.usedheap_ = v8stats.used_heap_size();
stats_.totalheap_ = v8stats.total_heap_size();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How expensive are these calls? Should we try to make them only once each?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes. that's probably a much better idea. I've updated the code to not do the extra call.

@amit777
Copy link
Author

amit777 commented Apr 29, 2016

Hi. I've added some extra methods to set a couple custom properties in the json as well as to configure the report interval at runtime.

// returns -1), then the reporting thread will wait MAX_INACTIVITY_RETRIES
// before trying again.
static const int REPORT_INTERVAL_MS = 1000;
static int REPORT_INTERVAL_MS = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this static const int?

@mrantivirus
Copy link

It's been more than 2 years, will this ever be added?

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

Successfully merging this pull request may close these issues.

6 participants