-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
test(gatsby): Add a memory test suite command to the memory benchmark #34810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
RUN if [ "$jemalloc" = "1" ]; then \ | ||
echo "Using jemalloc for memory allocation" && \ | ||
apt-get update && apt-get install -y libjemalloc-dev=5.1.0-3 && \ | ||
echo "/usr/lib/x86_64-linux-gnu/libjemalloc.so" >> /etc/ld.so.preload && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, just future opportunity:
Maybe we can just install jemalloc
always in image and then have --use-jemalloc
as toggle for cli (we could set LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so
env var in test runner script to enable it), this could limit how often we have to (re)build image when testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I think if we revisit this, that's a good improvement.
// there's something buggy with the node/exec/docker-exec integration | ||
// we're getting seg faults, so this loop is just a patch for that | ||
// so we don't have to fix it right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How often does that happen? We shouldn't be getting flakes like that :S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 1/5 times? Fairly often... I tried to debug it for ~30 minutes and couldn't find it. It has nothing to do with our build, but the docker exec
. Still very confused by it.
I've accounted for this in our timings, so it only pulls the timing for the latest build. It'll slow the test run down a tiny bit, but doesn't affect much else. Just annoying. 😦
Description
This PR adds a test suite capability to the benchmarking tool we created previously.
This allows us to measure the impact of changes we make to our build process. Notably, it gives us data showing that our efforts in recent memory improvements have a positive impact. In the future, we'll be able to use this to test other improvements.
This CSVs output from these test suites allow us to create graphs like this:
In the future, we may be able to use this to add smoke tests to our CI. 👀
For more information, check out the README.
Examples:
Documentation
Updated the README!