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 Benchmark.memory #7835

Merged
merged 4 commits into from Jun 12, 2019

Conversation

@r00ster91
Copy link
Contributor

commented May 31, 2019

Sometimes not only execution speed is of interest but also the consumed memory, when your program runs on a device with low RAM for example, like a Raspberry Pi. So I think it would be good to abstract IPS' internal GC stats total bytes computation into a method which can be conveniently used instead of having to wait for a benchmark entry to finish first just to see the consumed memory. There's also that Warning: benchmarking without the `--release` flag won't yield useful results message then which is unwanted output in that case.

r00ster91 added some commits May 31, 2019

Show resolved Hide resolved src/benchmark/ips.cr Outdated
@wontruefree

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

This is great I have been wanting to do this with some projects but have not looked into it.
I would totally use this.

@RX14

RX14 approved these changes Jun 12, 2019

@straight-shoota straight-shoota merged commit c68418e into crystal-lang:master Jun 12, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@straight-shoota straight-shoota added this to the 0.30.0 milestone Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.