Added heap used and total heap statistics.#35
Conversation
|
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! 😄 |
|
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. |
|
It should pick it up, no need to add another PR :) |
|
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(); |
There was a problem hiding this comment.
How expensive are these calls? Should we try to make them only once each?
There was a problem hiding this comment.
oh yes. that's probably a much better idea. I've updated the code to not do the extra call.
|
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; |
There was a problem hiding this comment.
Can you make this static const int?
|
It's been more than 2 years, will this ever be added? |
I also clarified the definition of the "mem" attribute to be the ratio of heap used to total heap.