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

Add memory profiling #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lyddonb
Copy link

@lyddonb lyddonb commented Mar 20, 2014

Use the GAE runtime module and the memory_usage().current() to get the memory
used by the request.

@robertkluin

Use the GAE runtime module and the memory_usage().current() to get the memory
used by the request.
@@ -135,6 +139,8 @@ def get_profile_data(self):
return {
'overhead': int(self.overhead * 1000),
'exec_time': int((time.time() - self.start_timestamp) * 1000),
'memory_start': self.start_memory,
'memory_end': runtime.memory_usage().current(),
Copy link
Owner

Choose a reason for hiding this comment

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

I almost wonder if we should just emit the end and delta? You can always compute start from that, and probably you'll want either ending memory or the delta, I presume?

Copy link
Author

Choose a reason for hiding this comment

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

Yep. I'll switch to that.

@lyddonb
Copy link
Author

lyddonb commented Mar 24, 2014

@robertkluin updated.

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.

3 participants