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

bpo-40669: Make memory_profiler optional for running PEG benchmarks #20172

Closed
wants to merge 1 commit into from

Conversation

lysnikolaou
Copy link
Contributor

@lysnikolaou lysnikolaou commented May 18, 2020

@@ -43,16 +47,17 @@

def benchmark(func):
def wrapper(*args):
print(f"{func.__name__}")
Copy link
Member

@gvanrossum gvanrossum May 18, 2020

Choose a reason for hiding this comment

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

I just ran into a situation where this was quite confusing. make time_compile prints time_compile here. But make time_stdlib_compile also prints time_compile here. Maybe the printing should happen at an earlier point and it should print more info about the parameters to the program?

print(f"\tMemory: {max(memory)} MiB on an average of 3 runs")
if MEMORY_BENCHMARKS:
memory = memory_profiler.memory_usage((func, args))
print(f"\tMemory: {max(memory)} MiB on an average of 3 runs")
Copy link
Member

@gvanrossum gvanrossum May 18, 2020

Choose a reason for hiding this comment

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

Please add an else: that prints one line of instructions on how to install memory_profiler.

@lysnikolaou
Copy link
Contributor Author

lysnikolaou commented May 18, 2020

Superseded by #20183.

@lysnikolaou lysnikolaou deleted the benchmarks branch May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants