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

GAIAPLAT-1721 : Adding memory sampling support to framework. #1089

Merged
merged 3 commits into from
Dec 6, 2021
Merged

Conversation

JackAtGaia
Copy link

https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1721

Part of tracking performance is being able to track memory usage over an extended period of time. This work uses a "custom" ps_mem.py script to try and get a decent picture of what that memory usage looks like for the gaia_db_server application.

Note that the use of ps_mem.py is a first step, and I am open to adding in other memory sampling scripts after this has been tested and we have a good idea of where any pitfalls of this script are.

Note that some of this work overlaps with: #1075 regarding aggregating test suites and adding database support to the scripts.

Copy link
Contributor

@LaurentiuCristofor LaurentiuCristofor left a comment

Choose a reason for hiding this comment

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

Just left some comments on messages and commenting. Did not verify the logic.

# Clean entrance into the script.
start_process

if [ $SHOW_MODE -ne 0 ] ; then
echo "Installed DEB pacakage as follows:"
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: pacakage

@@ -10,15 +10,18 @@ SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

# Set up any project based local script variables.
#
# Note that these three variables, SUITE_MODE, TEST_WORKLOADS, and USE_PERSISTENT_DATABASE
# are used within the sourced script. To keep shellcheck happy, we disable them.
# Note that these four variables, SUITE_MODE, TEST_WORKLOADS, USE_PERSISTENT_DATABASE,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe stop counting the variables so that you don't have to change the first line with every addition.


if [ -n "$DB_SERVER_PID" ] ; then
if [ "$VERBOSE_MODE" -ne 0 ]; then
echo "Killing started database server."
Copy link
Contributor

Choose a reason for hiding this comment

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

This reads funny. Did the killing start the database server? Was it meant to be "Killing the started database server" or simply: "Killing the database server" because nobody expects you'd be killing a non-started server.

# shellcheck disable=SC2181
if [ $? -ne 0 ] ; then
cat "$MEMORY_LOG_FILE"
complete_process 1 "Cannot start the database memory monitoring."
Copy link
Contributor

Choose a reason for hiding this comment

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

This style reminds me of German, with the verb at the end. I think it would read a bit more clearly if we'd said: "Cannot start the monitoring of the database memory".

@JackAtGaia JackAtGaia merged commit 4a33224 into master Dec 6, 2021
@JackAtGaia JackAtGaia deleted the 1721 branch December 6, 2021 16:27
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.

2 participants