-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(gatsby): Add a memory test suite command to the memory benchmark (…
…#34810) * Create memory test suite for measuring multiple runs * Minor updates * Add inc suite * Increase node's heap limit * Add memory tracking * Revert "Add memory tracking" This reverts commit 539291c. * Add docker rebuild command * Rework what/how results are given * Actually use path var * Revert "Revert "Add memory tracking"" This reverts commit f28ba4a. * Use faster method for grabbing memory usage * Output fixes * Update output dir and add comments * Update readme * Update readme again * Add ability to conditionally set jemalloc as the memory allocator
- Loading branch information
Showing
9 changed files
with
444 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
output | ||
.docker.memusage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
while true; do | ||
PROCESS="node" | ||
|
||
# find all node processes | ||
PROCESS_USAGES=$(ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i "${PROCESS}" | awk '{print $1}') | ||
|
||
# sum the usage | ||
SUM_USAGE=$(echo "$PROCESS_USAGES" | awk '{s+=$1} END {printf "%.0f\n", s}') | ||
|
||
# write to file | ||
echo -e "$SUM_USAGE" > /usr/src/app/.docker.memusage | ||
sleep .25 | ||
done |
Oops, something went wrong.