Skip to content

Commit

Permalink
More tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Dec 27, 2024
1 parent c74907d commit 89f51e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions runner/main/jobtypes/performance/performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,11 @@ function performance_run() {
# Performance job type teardown.
function performance_teardown() {
echo "Storing data with a git commit of '${GIT_COMMIT}'"
mkdir -p "${WORKSPACE}/results/${GIT_COMMIT}/runs"
cp -rf "${SHAREDDIR}/output/logs" "${WORKSPACE}/results/${GIT_COMMIT}/logs"
cp "${SHAREDDIR}/output/runs/rundata.php" "${WORKSPACE}/results/${GIT_COMMIT}/runs/rundata.php"
tree "${WORKSPACE}/results"

# We use the storage directory to store data for long term comparison.
TARGET="${WORKSPACE}/storage/${MOODLE_BRANCH}/${SITESIZE}"
mkdir -p "${TARGET}"
cp -rf "${SHAREDDIR}/output/runs/rundata.php" "${TARGET}/${GIT_COMMIT}.php"
}

# Calculate the command to run for Performance main execution,
Expand All @@ -259,6 +260,7 @@ function performance_main_command() {


# TODO: Get all of these values from somewhere?
# In particular where to get users, loops, rampup, and throughput from?
# Build the complete perf command for the run.
_cmd=(
-n \
Expand Down
4 changes: 1 addition & 3 deletions runner/main/modules/docker-jmeter/libraries/recorder.bsf
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ if (JMeterUtils.getProperty("headerprinted") == null) {
JMeterUtils.setProperty("headerprinted", "1");
print(mr.headerToString());

WritePhpValue("starttime", (System.currentTimeMillis() / 1000L).toString());
WritePhpValue("host", vars.get("host"));
WritePhpValue("sitepath", vars.get("sitepath"));
WritePhpValue("group", props.get("group"));
Expand All @@ -211,9 +212,6 @@ if (JMeterUtils.getProperty("headerprinted") == null) {
WritePhpValue("siteversion", props.get("siteversion"), true);
WritePhpValue("sitebranch", props.get("sitebranch"), true);
WritePhpValue("sitecommit", props.get("sitecommit"));

// Send the run timestamp to set it as run filename.
props.put("filepath", "runs/" + vars.get("runtimestamp") + ".php");
}

WritePhpLine(mr.toPHP());
Expand Down

0 comments on commit 89f51e9

Please sign in to comment.