diff --git a/runner/main/jobtypes/performance/performance.sh b/runner/main/jobtypes/performance/performance.sh index 39835b4..3e0e121 100644 --- a/runner/main/jobtypes/performance/performance.sh +++ b/runner/main/jobtypes/performance/performance.sh @@ -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, @@ -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 \ diff --git a/runner/main/modules/docker-jmeter/libraries/recorder.bsf b/runner/main/modules/docker-jmeter/libraries/recorder.bsf index 11f9b19..1507b14 100644 --- a/runner/main/modules/docker-jmeter/libraries/recorder.bsf +++ b/runner/main/modules/docker-jmeter/libraries/recorder.bsf @@ -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")); @@ -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());