diff --git a/utilities/load-testing/build.xml b/utilities/load-testing/build.xml deleted file mode 100644 index a3cbc966..00000000 --- a/utilities/load-testing/build.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - Run JMeter tests and summarize the results. - - - - - - - - - - - -all - Run the tests and summarize the output. -clean - Remove any existing output and summaries. -run - Just run the tests. -report - Just summarize output from previously run tests. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${TIMESTAMP}

]]> -
-
- - - - - - - - - - - - - - - - - - - - -
diff --git a/utilities/load-testing/example.loadtesting.properties b/utilities/load-testing/example.loadtesting.properties deleted file mode 100644 index ec1634c5..00000000 --- a/utilities/load-testing/example.loadtesting.properties +++ /dev/null @@ -1,37 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# VIVO load-testing properties -# -# This file is provided as example.loadtesting.properties. -# -# Save a copy of this file as loadtesting.properties, and edit the properties -# as needed for your deployment. -# -# ----------------------------------------------------------------------------- - -# -# What test should we run? -# -test.name = SecondTests-rel-1-2 - -# -# The base install directory for JMeter, and some JARs required by XSLT -# -jmeter.home.dir = /Users/jeb228/Downloads/JMeter/jakarta-jmeter-2.4 - -# -# Where do we find the Vivo instance that we are testing? -# -webapp.host = localhost -webapp.port = 8080 -webapp.name = vivo - -# -# Where is the data to test against? -# -data.dir = /eclipseVitroWorkspace/vivo/utilities/load-testing/tests - -# -# What's the default namespace (URIs are expressed as local-name only) -# -default.namespace = http://vivo.cornell.edu/individual/ \ No newline at end of file diff --git a/utilities/load-testing/jmeter-results-detail-report.xsl b/utilities/load-testing/jmeter-results-detail-report.xsl deleted file mode 100644 index 872cb782..00000000 --- a/utilities/load-testing/jmeter-results-detail-report.xsl +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - Load Test Results - - - - - - - - -
- - -
- - - - - -
- - -

Load Test Results

- - - - - -
Designed for use with JMeter and Ant.
-
-
- - -

Summary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - Failure - - - - - - - - - -
TestsFailuresSuccess RateAverage TimeMin TimeMax Time
- - - - - - - - - - - - - - - - - - - -
-
- - -

Pages

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Failure - - - - - - - - - - - - - - page_details_ - - - - -
URLTestsFailuresSuccess RateAverage TimeMin TimeMax Time
- - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - javascript:change('page_details_') - expand/collapsepage_details__image - -
-
- Details for Page "" - - - - - - - - - - - - - - - - - - -
ThreadIterationTimeSuccess
ms
-
-
-
- - - - - -

Failure Detail

- - - - - - -

- - - - - - - - - - - - - - - - - - - - -
ResponseFailure MessageResponse Data
-
-
- -
-
-
- - - - - NaN - - - - - - - - - - - - - - - NaN - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/utilities/load-testing/jmeter-results-report.xsl b/utilities/load-testing/jmeter-results-report.xsl deleted file mode 100644 index 0c7d5adb..00000000 --- a/utilities/load-testing/jmeter-results-report.xsl +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - Load Test Results - - - - - - - -
- - -
- - - - - -
- - -

Load Test Results

- - - - - -
Designed for use with JMeter and Ant.
-
-
- - -

Summary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - Failure - - - - - - - - - -
TestsFailuresSuccess RateAverage TimeMin TimeMax Time
- - - - - - - - - - - - - - - - - - - -
-
- - -

Pages

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Failure - - - - - - - - - - - -
URLTestsFailuresSuccess RateAverage TimeMin TimeMax Time
- - - - - - - - - - - - - - - - - - - - - -
-
- - - - - -

Failure Detail

- - - - - - -

- - - - - - - - - - - - - - -
ResponseFailure Message
-
-
- -
-
-
- - - - - NaN - - - - - - - - - - - - - - - NaN - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/utilities/load-testing/lib/ant-jmeter-1.0.9.jar b/utilities/load-testing/lib/ant-jmeter-1.0.9.jar deleted file mode 100644 index 420eccc1..00000000 Binary files a/utilities/load-testing/lib/ant-jmeter-1.0.9.jar and /dev/null differ diff --git a/utilities/load-testing/mergedResults.css b/utilities/load-testing/mergedResults.css deleted file mode 100644 index 9de6b08a..00000000 --- a/utilities/load-testing/mergedResults.css +++ /dev/null @@ -1,40 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -table.testData { -} - -table.testData td,th { - border: thin solid black; - font-family: sans-serif; - text-align: center; -} - -table.testData td.left { - text-align: left; -} - -table.testData td.open { - border-right: none; -} - -table.testData td.middle { - border-left: none; - border-right: none; -} - -table.testData td.close { - border-left: none; -} - -table.oneResult td { - border: none; -} - -table.oneResult { - border: thin solid black; - width: 100%; -} - -table.oneResult td.minmax { - font-size: smaller; -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller.java deleted file mode 100644 index 4eb3902f..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller.java +++ /dev/null @@ -1,143 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.PrintWriter; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - - -/** - * Write the merged data to an HTML page. - */ -public class OutputMarshaller { - private final List reportData; - private final PrintWriter w; - private final List testNames; - - public OutputMarshaller(List reportData, PrintWriter w) { - this.reportData = reportData; - this.w = w; - this.testNames = assembleListOfTestNames(); - } - - public void marshall() { - writePageHeader(); - writeTestDataTable(); - writePageFooter(); - } - - private List assembleListOfTestNames() { - Set names = new TreeSet(); - for (TestResultsFileData filedata : reportData) { - names.addAll(filedata.getTestMap().keySet()); - } - return new ArrayList(names); - } - - private void writePageHeader() { - w.println(""); - w.println(""); - w.println(" "); - w.println(""); - w.println(""); - } - - private void writeTestDataTable() { - w.println(""); - writeTestDataHeader(); - for (String testName : testNames) { - writeTestDataRow(testName); - } - w.println("
"); - } - - private void writeTestDataHeader() { - w.println(" "); - w.println("  "); - for (TestResultsFileData fileData : reportData) { - w.println(" " + fileData.getVivoVersion() - + "
" + fileData.getResultsFilename() + "
" - + formatDate(fileData.getCreated()) + ""); - } - w.println(" "); - - w.println(" "); - w.println(" Test Name"); - for (TestResultsFileData fileData : reportData) { - w.println(" iterations"); - w.println(" time (min/max)"); - w.println(" ratio"); - } - w.println(" "); - } - - private void writeTestDataRow(String testName) { - w.println(" "); - w.println(" " + testName + ""); - for (TestResultsFileData fileData : reportData) { - writeTestDataCellForFile(fileData, testName); - } - w.println(" "); - } - - private void writeTestDataCellForFile(TestResultsFileData fileData, - String testName) { - TestResultInfo testData = fileData.getTestMap().get(testName); - TestResultInfo baselineTestData = reportData.get(0).getTestMap() - .get(testName); - - String count = (testData == null) ? " " : ("" + testData - .getCount()); - String averageTime = (testData == null) ? " " - : ("" + formatTime(testData.getAverageTime())); - String minTime = (testData == null) ? " " - : ("" + formatTime(testData.getMinTime())); - String maxTime = (testData == null) ? " " - : ("" + formatTime(testData.getMaxTime())); - - String ratioWithBaseline = " "; - if ((testData != null) && (baselineTestData != null)) { - ratioWithBaseline = percentage(testData.getAverageTime(), - baselineTestData.getAverageTime()); - } - - w.println(" " + count + ""); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println("
" + averageTime + "" + minTime + "
" + maxTime + "
"); - w.println(" " + ratioWithBaseline + ""); - w.println(" "); - } - - private String percentage(float value, float baseline) { - float ratio = value / baseline; - return String.format("%1$8.2f%%", ratio * 100.0); - } - - public String formatTime(float time) { - return String.format("%1$8.3f", time); - } - - public String formatDate(long date) { - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") - .format(new Date(date)); - } - - private void writePageFooter() { - w.println(""); - w.println(""); - } - -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller2.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller2.java deleted file mode 100644 index 08df6e98..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/OutputMarshaller2.java +++ /dev/null @@ -1,175 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.PrintWriter; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - - -/** - * Write the merged data to an HTML page. - * - * This version assumes that there are three files, and that they are 1.1.1, RDB - * and SDB, in that order. It compares the SDB results to the others. - */ -public class OutputMarshaller2 { - private final List reportData; - private final List columnsToCompare; - private final TestResultsFileData columnToCompareAgainst; - private final int howManyToCompare; - private final PrintWriter w; - private final List testNames; - - public OutputMarshaller2(List reportData, PrintWriter w) { - this.reportData = reportData; - this.howManyToCompare = reportData.size() - 1; - this.columnsToCompare = reportData.subList(0, howManyToCompare); - this.columnToCompareAgainst = reportData.get(howManyToCompare); - - this.w = w; - this.testNames = assembleListOfTestNames(); - } - - public void marshall() { - writePageHeader(); - writeTestDataTable(); - writePageFooter(); - } - - private List assembleListOfTestNames() { - Set names = new TreeSet(); - for (TestResultsFileData filedata : reportData) { - names.addAll(filedata.getTestMap().keySet()); - } - return new ArrayList(names); - } - - private void writePageHeader() { - w.println(""); - w.println(""); - w.println(" "); - w.println(""); - w.println(""); - } - - private void writeTestDataTable() { - w.println(""); - writeTestDataHeader(); - for (String testName : testNames) { - writeTestDataRow(testName); - } - w.println("
"); - } - - private void writeTestDataHeader() { - // header first row - w.println(" "); - w.println("  "); - for (TestResultsFileData fileData : reportData) { - w.println(" " + fileData.getVivoVersion() - + "
" + fileData.getResultsFilename() + "
" - + formatDate(fileData.getCreated()) + ""); - } - w.println(" performance ratios"); - w.println(" "); - - // header second row - w.println(" "); - w.println(" Test Name"); - for (int i = 0; i < reportData.size(); i++) { - w.println(" iterations"); - w.println(" time (min/max)"); - } - for (int i = 0; i < howManyToCompare; i++) { - switch (i) { - case 0: - w.println(" vs 1.2"); - break; - default: - w.println("  "); - break; - } - } - w.println(" "); - } - - private void writeTestDataRow(String testName) { - w.println(" "); - w.println(" " + testName + ""); - for (TestResultsFileData fileData : reportData) { - writeTestDataCellForFile(fileData, testName); - } - for (TestResultsFileData fileData : columnsToCompare) { - writeComparisonDataCell(fileData, testName); - } - w.println(" "); - } - - private void writeTestDataCellForFile(TestResultsFileData fileData, - String testName) { - TestResultInfo testData = fileData.getTestMap().get(testName); - - String count = (testData == null) ? " " : ("" + testData - .getCount()); - String averageTime = (testData == null) ? " " - : ("" + formatTime(testData.getAverageTime())); - String minTime = (testData == null) ? " " - : ("" + formatTime(testData.getMinTime())); - String maxTime = (testData == null) ? " " - : ("" + formatTime(testData.getMaxTime())); - - w.println(" " + count + ""); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println(" "); - w.println("
" + averageTime + "" + minTime + "
" + maxTime + "
"); - w.println(" "); - } - - private void writeComparisonDataCell(TestResultsFileData fileData, - String testName) { - TestResultInfo testData = fileData.getTestMap().get(testName); - TestResultInfo baselineTestData = columnToCompareAgainst.getTestMap() - .get(testName); - - String ratioWithBaseline = " "; - if ((testData != null) && (baselineTestData != null)) { - ratioWithBaseline = percentage(baselineTestData.getAverageTime(), - testData.getAverageTime()); - } - - w.println(" " + ratioWithBaseline + ""); - } - - private String percentage(float value, float baseline) { - float ratio = value / baseline; - return String.format("%1$8.2f%%", ratio * 100.0); - } - - public String formatTime(float time) { - return String.format("%1$8.3f", time); - } - - public String formatDate(long date) { - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") - .format(new Date(date)); - } - - private void writePageFooter() { - w.println(""); - w.println(""); - } - -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMerger.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMerger.java deleted file mode 100644 index 7e329b8c..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMerger.java +++ /dev/null @@ -1,71 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.File; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; - - -/** - * Take two or more reports from JMeter's test results, and merge them into a - * unified HTML report. - */ -public class ReportsMerger { - - /** - * Start with list of filenames in command line For each contributing file, - * heading is from parsing the filename. Get the one after LoadTesting, and - * the last one, minus the extension. - * - * For each file, build a structure with header info and a LinkedMap of the - * desired info, testname -> info structure Build a list of these. Build a - * unified list of testnames. - * - * List - * - * TestResultsFile: String version; String filename; Date timestamp; - * LinkedMap testMap; - * - * TestResultInfo: boolean success; int count; float averageTime; float - * maxTime; float minTime; - */ - - private final ReportsMergerParameters parms; - private List reportData; - - public ReportsMerger(ReportsMergerParameters parms) { - this.parms = parms; - } - - private void parseReports() { - List reportData = new ArrayList(); - for (File reportFile : parms.getReportFiles()) { - TestResultsFileData fileData = new TestResultsParser(reportFile) - .parse(); - System.out.println("File data: " + fileData); - reportData.add(fileData); - } - this.reportData = reportData; - } - - private void produceOutput() { - PrintWriter writer = parms.getOutputWriter(); - new OutputMarshaller2(reportData, writer).marshall(); - writer.flush(); - writer.close(); - } - - /** - * @param args - */ - public static void main(String[] args) { - ReportsMergerParameters parms = ReportsMergerParameters - .getInstance(args); - ReportsMerger rm = new ReportsMerger(parms); - rm.parseReports(); - rm.produceOutput(); - } - -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParameters.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParameters.java deleted file mode 100644 index d6d8d990..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParameters.java +++ /dev/null @@ -1,22 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.File; -import java.io.PrintWriter; -import java.util.List; - - -/** - * Parse the command-line parameters for the ReportManager - */ -public abstract class ReportsMergerParameters { - - public static ReportsMergerParameters getInstance(String[] args) { - return new ReportsMergerParametersImpl(args); - } - - public abstract List getReportFiles(); - - public abstract PrintWriter getOutputWriter(); -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParametersImpl.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParametersImpl.java deleted file mode 100644 index f7007b5a..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/ReportsMergerParametersImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - - -/** - * A base implementation of ReportsMergerParameters - */ -public class ReportsMergerParametersImpl extends ReportsMergerParameters { - - private final String outputDirectoryPath; - private final String inputDirectoryPath; - private final List inputFilenames; - - /** - * The first arg is the output directory. The second arg is an input - * directory. The third arg is a comma-separated list of input filenames. - */ - public ReportsMergerParametersImpl(String[] args) { - this.outputDirectoryPath = args[0]; - this.inputDirectoryPath = args[1]; - this.inputFilenames = Arrays.asList(args[2].split("[, ]+")); - } - - @Override - public List getReportFiles() { - List files = new ArrayList(); - for (String filename : inputFilenames) { - files.add(new File(inputDirectoryPath, filename)); - } - // files.add(new File( - // "/Development/JIRA issues/NIHVIVO-1129_Load_testing/mergerFiles/LoadTesting/release1.1.1/SecondTests-rel-1-1-1.html")); - // files.add(new File( - // "/Development/JIRA issues/NIHVIVO-1129_Load_testing/mergerFiles/LoadTesting/trunkNoSdb/SecondTests-rel-1-2.html")); - // files.add(new File( - // "/Development/JIRA issues/NIHVIVO-1129_Load_testing/mergerFiles/LoadTesting/trunkSdb/SecondTests-rel-1-2.html")); - return files; - } - - @Override - public PrintWriter getOutputWriter() { - try { - File outputFile = new File(outputDirectoryPath, - "mergedResults.html"); - return new PrintWriter(new FileWriter(outputFile)); - } catch (IOException e) { - throw new RuntimeException("Can't open the output writer.", e); - } - } - -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultInfo.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultInfo.java deleted file mode 100644 index 11931534..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultInfo.java +++ /dev/null @@ -1,56 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -/** - * Info about the executions of a single test in a single file. - */ -public class TestResultInfo { - private final String testName; - private final boolean success; - private final int count; - private final float averageTime; - private final float maxTime; - private final float minTime; - - public TestResultInfo(String testName, boolean success, int count, - float averageTime, float maxTime, float minTime) { - this.testName = testName; - this.success = success; - this.count = count; - this.averageTime = averageTime; - this.maxTime = maxTime; - this.minTime = minTime; - } - - public String getTestName() { - return testName; - } - - public boolean isSuccess() { - return success; - } - - public int getCount() { - return count; - } - - public float getAverageTime() { - return averageTime; - } - - public float getMaxTime() { - return maxTime; - } - - public float getMinTime() { - return minTime; - } - - @Override - public String toString() { - return "TestResultInfo[testName=" + testName + ", success=" + success - + ", count=" + count + ", averageTime=" + averageTime - + ", maxTime=" + maxTime + ", minTime=" + minTime + "]"; - } -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsFileData.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsFileData.java deleted file mode 100644 index ef333d7e..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsFileData.java +++ /dev/null @@ -1,56 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.LinkedHashMap; -import java.util.Map; - - -/** - * Holds the data that was parsed from a single results file. - */ -public class TestResultsFileData { - private final String vivoVersion; - private final String resultsFilename; - private final long created; - private final LinkedHashMap testMap; - - public TestResultsFileData(String vivoVersion, String resultsFilename, - long created, Map testMap) { - this.vivoVersion = vivoVersion; - this.resultsFilename = resultsFilename; - this.created = created; - this.testMap = new LinkedHashMap(testMap); - } - - public String getTimeStamp() { - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date( - created)); - } - - public String getVivoVersion() { - return vivoVersion; - } - - public String getResultsFilename() { - return resultsFilename; - } - - public long getCreated() { - return created; - } - - public LinkedHashMap getTestMap() { - return testMap; - } - - @Override - public String toString() { - return "TestResultsFileData[vivoVersion=" + vivoVersion - + ", resultsFilename=" + resultsFilename + ", created=" - + getTimeStamp() + ", testMap=" + testMap + "]"; - } - -} diff --git a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsParser.java b/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsParser.java deleted file mode 100644 index df756c3a..00000000 --- a/utilities/load-testing/src/edu/cornell/mannlib/vitro/utilities/loadtesting/reportmerger/TestResultsParser.java +++ /dev/null @@ -1,169 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.utilities.loadtesting.reportmerger; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - - -/** - * Parse a single test results file. - */ -public class TestResultsParser { - /** Find the "Pages" table in the file. */ - private static final String PATTERN_PAGES_TABLE = "

Pages

]*>(.*?)"; - - /** Find a row in the table. */ - private static final String PATTERN_TABLE_ROW = "]*>(.*?)"; - - private final File reportFile; - private final String filePath; - - public TestResultsParser(File reportFile) { - this.reportFile = reportFile; - this.filePath = reportFile.getAbsolutePath(); - } - - /** - * Get info from the file path, the create date, and the contents of the - * file. - */ - public TestResultsFileData parse() { - String[] pathInfo = parseInfoFromFilePath(); - Map testMap = extractTestMap(); - return new TestResultsFileData(pathInfo[0], pathInfo[1], - reportFile.lastModified(), testMap); - } - - private String[] parseInfoFromFilePath() { - String vivoVersion = "--"; - String[] pathParts = filePath.split(Pattern.quote(File.separator)); - for (int i = 0; i < pathParts.length; i++) { - if (pathParts[i].startsWith("ver_")) { - vivoVersion = pathParts[i].substring(4); - } - } - - String trimmedFilename = reportFile.getName().substring(0, - reportFile.getName().lastIndexOf('.')); - - return new String[] { vivoVersion, trimmedFilename }; - } - - /** - * Scan through the contents of the file for info - */ - private Map extractTestMap() { - String contents = readEntireFileWithoutLineFeeds(); - - String pagesTable = findPagesTableInFile(contents); - // System.out.println("PagesTable: " + pagesTable); - - return parsePagesTable(pagesTable); - } - - private String readEntireFileWithoutLineFeeds() { - StringBuilder result = new StringBuilder(); - BufferedReader reader = null; - - try { - reader = new BufferedReader(new FileReader(reportFile)); - - String line; - while (null != (line = reader.readLine())) { - result.append(line); - } - return result.toString(); - } catch (FileNotFoundException e) { - throw new RuntimeException( - "File doesn't exist: '" + filePath + "'", e); - } catch (IOException e) { - throw new RuntimeException("Failed to read the file: '" + filePath - + "'", e); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } - - private String findPagesTableInFile(String contents) { - Pattern p = Pattern.compile(PATTERN_PAGES_TABLE); - Matcher m = p.matcher(contents); - if (m.find()) { - return m.group(1); - } - throw new RuntimeException("Failed to find the 'Pages' " - + "table in file: '" + filePath + "'"); - } - - private Map parsePagesTable(String pagesTable) { - Map map = new LinkedHashMap(); - - Pattern p = Pattern.compile(PATTERN_TABLE_ROW); - Matcher m = p.matcher(pagesTable); - - discardHeaderRowFromPagesTable(m); - - while (m.find()) { - TestResultInfo info = parseTestRowFromPagesTable(m.group(1)); - map.put(info.getTestName(), info); - } - return map; - } - - private void discardHeaderRowFromPagesTable(Matcher m) { - if (!m.find()) { - throw new RuntimeException("Failed to find a header row " - + "in the 'Pages' table, in file: '" + filePath + "'"); - } - } - - private TestResultInfo parseTestRowFromPagesTable(String tableRow) { - // System.out.println("Table Row: " + tableRow); - - List cells = new ArrayList(); - - Pattern p = Pattern.compile("(.*?)"); - Matcher m = p.matcher(tableRow); - while (m.find()) { - cells.add(m.group(1)); - } - // System.out.println("Cells: " + cells); - - if (cells.size() < 7) { - throw new RuntimeException("Only " + cells.size() - + " cells in this table row: '" + tableRow - + "', in file: '" + filePath + "'"); - } - - String testName = cells.get(0); - int count = Integer.parseInt(cells.get(1)); - boolean success = cells.get(2).equals("0"); - float averageTime = parseTimeFromCell(cells.get(4)); - float minTime = parseTimeFromCell(cells.get(5)); - float maxTime = parseTimeFromCell(cells.get(6)); - - return new TestResultInfo(testName, success, count, averageTime, - maxTime, minTime); - } - - private float parseTimeFromCell(String cell) { - String[] parts = cell.split(" "); - return Integer.parseInt(parts[0]) / 1000.0F; - } - -} diff --git a/utilities/load-testing/testResultMunger/_mergeTestResults.rb b/utilities/load-testing/testResultMunger/_mergeTestResults.rb deleted file mode 100644 index 516cd836..00000000 --- a/utilities/load-testing/testResultMunger/_mergeTestResults.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/ruby - -require "#{File.dirname(__FILE__)}/subscripts/loadParms" -require "#{File.dirname(__FILE__)}/subscripts/test_result_merger" - -properties = {} - -source_dir = "/home/jeb228/LoadTesting/tests/results/#{@version_name}" -properties["source_directory"] = source_dir -properties["target_directory"] = "/var/www/html/loadTesting/" -properties["version_name"] = ""#{@version_name}" - -suggestions = [] -if File.directory?(source_dir) - Dir.chdir(source_dir) do |dir| - if File.file?("fileOrderSuggestions.txt") - File.open("fileOrderSuggestions.txt") do |f| - f.each_line() do |line| - suggestions.push(line.strip()) - end - end - end - end -end -properties["file_order_suggestions"] = suggestions - -trm = TestResultMerger.new(properties) -trm.merge - -puts "TestResultMerger was successful." - diff --git a/utilities/load-testing/testResultMunger/test_result_file.rb b/utilities/load-testing/testResultMunger/test_result_file.rb deleted file mode 100644 index 1963eab8..00000000 --- a/utilities/load-testing/testResultMunger/test_result_file.rb +++ /dev/null @@ -1,101 +0,0 @@ -#! /usr/bin/ruby - -=begin --------------------------------------------------------------------------------- - -Parse a file of JMeter test results (*./jtl), summarize the times for each test, -and make the summaries easily available. - --------------------------------------------------------------------------------- -=end - -require "rexml/document" - -include REXML - -# ------------------------------------------------------------------------------------ -# TestResultSummary class -# ------------------------------------------------------------------------------------ - -class TestResultSummary - attr_reader :label - attr_reader :how_many - attr_reader :failures - attr_reader :min_time - attr_reader :max_time - attr_reader :avg_time - def addResult(result_element) - @how_many += 1 - @failures += 1 unless result_element.attributes["s"] == "true" - - time = result_element.attributes["t"].to_i - @total_time += time - @min_time = [@min_time, time].min - @max_time = [@max_time, time].max - - @avg_time = @total_time / how_many - end - - def initialize(result_element) - @label = result_element.attributes["lb"] - @how_many = 0 - @failures = 0 - @min_time = 100000000 - @max_time = 0 - @total_time = 0 - - addResult(result_element) - end -end - -# ------------------------------------------------------------------------------------ -# TestResultFile class -# ------------------------------------------------------------------------------------ - -class TestResultFile - attr_reader :filename - attr_reader :timestamp - attr_reader :summaries - attr_reader :version - def parse_result_file() - @summaries = {} - @version = "_" - - file = File.new( @file_path ) - doc = Document.new file - XPath.each(doc, "/testResults/httpSample") do | result | - test_label = result.attributes["lb"] - if @summaries[test_label] == nil - @summaries[test_label] = TestResultSummary.new(result) - else - @summaries[test_label].addResult(result) - end - end - - XPath.each(doc, "version") do | version | - @version = version.attributes["name"] - end - end - - def initialize(filename, source_directory) - raise("filename must not be nil") if filename == nil - raise("source_directory must not be nil") if source_directory == nil - - @filename = filename - @source_directory = source_directory - - if !File.directory?(@source_directory) - raise "Directory does not exist: '#{@source_directory}'." - end - - @file_path = File.expand_path(filename + ".jtl", @source_directory) - - if !File.file?(@file_path) - raise "File doesn't exist: '#{@file_path}'." - end - - @timestamp = File.mtime(@file_path) - - parse_result_file() - end -end diff --git a/utilities/load-testing/testResultMunger/test_result_marshaller.rb b/utilities/load-testing/testResultMunger/test_result_marshaller.rb deleted file mode 100644 index 9ec304ce..00000000 --- a/utilities/load-testing/testResultMunger/test_result_marshaller.rb +++ /dev/null @@ -1,160 +0,0 @@ -#! /usr/bin/ruby - -=begin --------------------------------------------------------------------------------- - -Parse a file of JMeter test results (*./jtl), summarize the times for each test, -and make the summaries easily available. - --------------------------------------------------------------------------------- -=end - -# ------------------------------------------------------------------------------------ -# TestResultMarshaller class -# ------------------------------------------------------------------------------------ - -class TestResultMarshaller - def marshall() - File.open(@output_filename, 'w') do | out | - write_html_header(out) - write_table_header(out) - write_table_lines(out) - write_table_footer(out) - write_html_footer(out) - end - end - - def write_html_header(out) - out.puts <<"EOF" - - - - Performance tests for #{@site_name} - - -EOF - end - - def write_table_header(out) - top_cells = [' '] - @test_results.each do | test | - top_cells.push("#{test.version}
#{test.filename}
#{test.timestamp.strftime('%Y-%m-%d %H:%M:%S')}") - end - - bottom_cells = ['Test Name'] - @test_results.each do | test | - bottom_cells.push('Iterations') - bottom_cells.push('time
(min/max)') - bottom_cells.push("compare") - end - - out.puts <<"EOF" - - - #{top_cells.join("\n ")} - - - #{bottom_cells.join("\n ")} - -EOF - end - - def write_table_lines(out) - all_test_names().each do | test_name | - out.puts <<"EOF" - - - #{format_test_results(test_name)} - -EOF - end - end - - def all_test_names - names = [] - @test_results.each do | test | - names.concat(test.summaries.keys) - end - names.uniq.sort - end - - def format_test_results(test_name) - results = [] - @test_results.each do | test | - results.push(format_test_result(test_name, test)) - end - results.join("\n ") - end - - def format_test_result(test_name, test) - s = test.summaries[test_name] - if s - <<"EOF" - - - -EOF - else - <<"EOF" - - - -EOF - end - end - - def format_millis(millis) - "%.3f" % [millis.to_f / 1000] - end - - def performance_ratio(test_name, time) - return " " if @test_results.empty? - return " " unless @test_results[0].summaries.key?(test_name) - - s = @test_results[0].summaries[test_name] - reference = s.avg_time - return " " if reference == 0 - - return "#{"%.0f" % [time * 100 / reference]}%" - end - - def write_table_footer(out) - out.puts "
#{test_name}
#{s.how_many} - - - - - - - - -
#{format_millis(s.avg_time)}#{format_millis(s.min_time)}
#{format_millis(s.max_time)}
-
#{performance_ratio(test_name, s.avg_time)}  - - - - - - - - -
  
 
-
 
" - end - - def write_html_footer(out) - out.puts <<"EOF" - - -EOF - end - - def initialize(target_directory, site_name, test_results) - @target_directory = target_directory - @site_name = site_name - @test_results = test_results - - filename = "#{site_name}-merged_#{Time.now.strftime('%Y-%m-%d_%H-%M-%S')}" - @output_filename = File.expand_path(filename, @target_directory) - end -end diff --git a/utilities/load-testing/testResultMunger/test_result_merger.rb b/utilities/load-testing/testResultMunger/test_result_merger.rb deleted file mode 100644 index e406d8d8..00000000 --- a/utilities/load-testing/testResultMunger/test_result_merger.rb +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/ruby - -=begin --------------------------------------------------------------------------------- - -Look through a directory of test results files (*.jtl), and produce an HTML file -that summarizes, merges, and compares the information. - --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -=end -$: << File.dirname(File.expand_path(__FILE__)) -require 'test_result_file' -require 'test_result_marshaller' - -# ------------------------------------------------------------------------------------ -# TestResultMerger class -# ------------------------------------------------------------------------------------ - -class TestResultMerger - # - # Do we have any chance of succeeding with these properties? - # - def sanity_checks_on_properties() - raise("Properties must contain a value for 'source_directory'") if @source_directory == nil - raise("Properties must contain a value for 'target_directory'") if @target_directory == nil - raise("Properties must contain a value for 'site_name'") if @site_name == nil - - if !File.directory?(@source_directory) - raise "Not a directory: '#{@source_directory}'." - end - if !File.directory?(@target_directory) - raise "Not a directory: '#{@target_directory}'." - end - end - - def parse_files() - test_result_files = build_file_list() - - @test_results = [] - test_result_files.each() do | test_result_file | - puts "Parsing #{test_result_file}" - @test_results.push(TestResultFile.new(test_result_file, @source_directory)) - end - end - - def build_file_list - existing_files = [] - Dir.foreach(@source_directory) do | filename | - next unless File.extname(filename) == ".jtl" - existing_files.push(File.basename(filename, ".jtl")) - end - puts "BOGUS existing files = [#{existing_files.join(', ')}]" - - file_list = [] - @file_order_suggestions.each() do | suggestion| - if existing_files.include?(suggestion) - file_list.push(suggestion) - existing_files.delete(suggestion) - end - end - file_list.concat(existing_files) - puts "BOGUS file list = [#{file_list.join(', ')}]" - - return file_list - end - - def marshall() - marshaller = TestResultMarshaller.new(@target_directory, @site_name, @test_results) - marshaller.marshall() - end - - def initialize(properties) - @source_directory = properties['source_directory'] - @target_directory = properties['target_directory'] - @site_name = properties['site_name'] - @file_order_suggestions = properties['file_order_suggestions'] - - puts "source_directory = #{@source_directory}" - puts "target_directory = #{@target_directory}" - puts "site_name = #{@site_name}" - if (@file_order_suggestions == nil) - puts "file_order_suggestions = nil" - else - puts "file_order_suggestions = [#{@file_order_suggestions.join(', ')}]" - end - - sanity_checks_on_properties - end - - def merge() - parse_files() - marshall() - end -end diff --git a/utilities/load-testing/tests/SecondTests-rel-1-1-1.jmx b/utilities/load-testing/tests/SecondTests-rel-1-1-1.jmx deleted file mode 100644 index 542ffbdc..00000000 --- a/utilities/load-testing/tests/SecondTests-rel-1-1-1.jmx +++ /dev/null @@ -1,515 +0,0 @@ - - - - - - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, , localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, , 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, , vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, , PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, , InfoResourceUris.csv)} - = - - - ITERATIONS - ${__property(iterations, , 10)} - = - - - THREADS - ${__property(threads, , 1)} - = - - - - - - - - continue - - false - ${ITERATIONS} - - ${THREADS} - 1 - 1294759350000 - 1294759350000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - These pages are run while the user is not logged in. - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - - - - ${WEBAPP_NAME}/authenticate?login=block - GET - true - false - true - false - false - - - - - - - - false - testAdmin - = - true - loginName - - - false - Password - = - true - loginPassword - - - false - block - = - true - login - - - - - - - - - - ${WEBAPP_NAME}/authenticate - GET - true - false - true - false - false - - - - - - Site Administration - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - - - - - - - - - - ${WEBAPP_NAME}/authenticate?login=block - GET - true - false - true - false - false - - - - - - - - false - dk15 - = - true - loginName - - - false - Password - = - true - loginPassword - - - false - block - = - true - login - - - - - - - - - - ${WEBAPP_NAME}/authenticate - GET - true - false - true - false - false - - - - - - Site Administration - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - diff --git a/utilities/load-testing/tests/SecondTests-rel-1-2.jmx b/utilities/load-testing/tests/SecondTests-rel-1-2.jmx deleted file mode 100644 index f00afc72..00000000 --- a/utilities/load-testing/tests/SecondTests-rel-1-2.jmx +++ /dev/null @@ -1,564 +0,0 @@ - - - - - - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, , localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, , 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, , vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, , PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, , InfoResourceUris.csv)} - = - - - ITERATIONS - ${__property(iterations, , 10)} - = - - - DEFAULT_NAMESPACE - ${__property(default.namespace, , http://vivo.mydomain.edu/individual/)} - = - - - THREADS - ${__property(threads, , 1)} - = - - - - - - - - continue - - false - ${ITERATIONS} - - ${THREADS} - ${THREADS} - 1294759350000 - 1294759350000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - These pages are run while the user is not logged in. - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - false - testAdmin - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/siteAdmin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?pubUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> core:authorInAuthorship ?authorshipUri . ?authorshipUri core:linkedInformationResource ?pubUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - pubUri - - Assertion.response_data - false - 2 - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?grantUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> <http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole> ?grantRole . ?grantRole core:roleIn ?grantUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - grantUri - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - - - - false - dk15 - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - diff --git a/utilities/load-testing/tests/SimpleTests-1-1-1.jmx b/utilities/load-testing/tests/SimpleTests-1-1-1.jmx deleted file mode 100644 index f1758abd..00000000 --- a/utilities/load-testing/tests/SimpleTests-1-1-1.jmx +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, , localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, , 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, , vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, , PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, , InfoResourceUris.csv)} - = - - - ITERATIONS - ${__property(iterations, , 10)} - = - - - THREADS - ${__property(threads, , 1)} - = - - - SELF_EDITOR_NAME - ${__property(self.editor.name)} - = - - - - - - - - continue - - false - ${ITERATIONS} - - ${THREADS} - 1 - 1294759350000 - 1294759350000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - These pages are run while the user is not logged in. - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/entitylist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - - - - ${WEBAPP_NAME}/authenticate?login=block - GET - true - false - true - false - false - - - - - - - - false - testAdmin - = - true - loginName - - - false - Password - = - true - loginPassword - - - false - block - = - true - login - - - - - - - - - - ${WEBAPP_NAME}/authenticate - GET - true - false - true - false - false - - - - - - Site Administration - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/entitylist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - - - - - - - - - - ${WEBAPP_NAME}/authenticate?login=block - GET - true - false - true - false - false - - - - - - - - false - ${SELF_EDITOR_NAME} - = - true - loginName - - - false - Password - = - true - loginPassword - - - false - block - = - true - login - - - - - - - - - - ${WEBAPP_NAME}/authenticate - GET - true - false - true - false - false - - - - - - Site Administration - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/entitylist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - diff --git a/utilities/load-testing/tests/SimpleTests-1-2.jmx b/utilities/load-testing/tests/SimpleTests-1-2.jmx deleted file mode 100644 index 746627c4..00000000 --- a/utilities/load-testing/tests/SimpleTests-1-2.jmx +++ /dev/null @@ -1,1209 +0,0 @@ - - - - - - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, , localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, , 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, , vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, , PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, , InfoResourceUris.csv)} - = - - - AUTHOR_URI_FILE - ${__property(file.author.uris, , AuthorUris.csv)} - = - - - ITERATIONS - ${__property(iterations, , 10)} - = - - - DEFAULT_NAMESPACE - ${__property(default.namespace, , http://vivo.mydomain.edu/individual/)} - = - - - THREADS - ${__property(threads, , 1)} - = - - - - - - - - continue - - false - ${ITERATIONS} - - ${THREADS} - ${THREADS} - 1294759350000 - 1294759350000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - These pages are run while the user is not logged in. - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - false - testAdmin - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/siteAdmin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?pubUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> core:authorInAuthorship ?authorshipUri . ?authorshipUri core:linkedInformationResource ?pubUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - pubUri - - Assertion.response_data - false - 2 - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?grantUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> <http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole> ?grantRole . ?grantRole core:roleIn ?grantUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - grantUri - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - - - - false - selfEditor - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - doesn't matter whether we are logged in or not - - - - - - - true - ${DEFAULT_NAMESPACE}${AUTHOR_URI} - = - true - uri - - - false - dynamic - = - true - render_mode - - - false - person_pub_count - = - true - vis - - - false - short - = - true - vis_mode - - - false - vis_container_coauthor - = - true - container - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${AUTHOR_URI_FILE} - false - true - All threads - false - AUTHOR_URI - - - - - drawPubCountVisualization - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PROFILE_INFO - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - {.+} - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - SHOW_GRANTS_LINK - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - {.+} - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PROFILE_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - individual - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PERSON_LEVEL_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - visualization - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - SHOW_AUTHORSHIP_LINK - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - numOfPublications - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - COPI_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - visualization - - Assertion.response_data - false - 2 - - - - - - - - diff --git a/utilities/load-testing/tests/SimpleTests-1-3.jmx b/utilities/load-testing/tests/SimpleTests-1-3.jmx deleted file mode 100644 index 1b045b7f..00000000 --- a/utilities/load-testing/tests/SimpleTests-1-3.jmx +++ /dev/null @@ -1,1209 +0,0 @@ - - - - - - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, , localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, , 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, , vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, , PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, , InfoResourceUris.csv)} - = - - - AUTHOR_URI_FILE - ${__property(file.author.uris, , AuthorUris.csv)} - = - - - ITERATIONS - ${__property(iterations, , 10)} - = - - - DEFAULT_NAMESPACE - ${__property(default.namespace, , http://vivo.mydomain.edu/individual/)} - = - - - THREADS - ${__property(threads, , 1)} - = - - - - - - - - continue - - false - ${ITERATIONS} - - ${THREADS} - ${THREADS} - 1294759350000 - 1294759350000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - These pages are run while the user is not logged in. - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - false - testAdmin - = - true - email - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/siteAdmin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?pubUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> core:authorInAuthorship ?authorshipUri . ?authorshipUri core:linkedInformationResource ?pubUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - pubUri - - Assertion.response_data - false - 2 - - - - - - - - false - PREFIX core: <http://vivoweb.org/ontology/core#> SELECT ?grantUri WHERE {<${DEFAULT_NAMESPACE}${PERSON_URI}> <http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole> ?grantRole . ?grantRole core:roleIn ?grantUri .} - = - true - query - - - - - - - - - - ${WEBAPP_NAME}/ajax/sparqlQuery - POST - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - grantUri - - Assertion.response_data - false - 2 - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - - - - false - selfEditor - = - true - email - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/browse - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/individuallist?vclassId=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/search?flag1=1&querytext=faculty - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - - false - true - false - All threads - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - doesn't matter whether we are logged in or not - - - - - - - true - ${DEFAULT_NAMESPACE}${AUTHOR_URI} - = - true - uri - - - false - dynamic - = - true - render_mode - - - false - person_pub_count - = - true - vis - - - false - short - = - true - vis_mode - - - false - vis_container_coauthor - = - true - container - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${AUTHOR_URI_FILE} - false - true - All threads - false - AUTHOR_URI - - - - - drawPubCountVisualization - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PROFILE_INFO - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - {.+} - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - SHOW_GRANTS_LINK - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - {.+} - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PROFILE_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - individual - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - PERSON_LEVEL_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - visualization - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - SHOW_AUTHORSHIP_LINK - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - numOfPublications - - Assertion.response_data - false - 2 - - - - - - - - true - ${DEFAULT_NAMESPACE}${PERSON_URI} - = - true - uri - - - false - utilities - = - true - vis - - - false - COPI_URL - = - true - vis_mode - - - - - - - - - - ${WEBAPP_NAME}/visualizationAjax - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - All threads - false - PERSON_URI - - - - - visualization - - Assertion.response_data - false - 2 - - - - - - - - diff --git a/utilities/load-testing/tests/firstTest.jmx b/utilities/load-testing/tests/firstTest.jmx deleted file mode 100644 index 39fd9370..00000000 --- a/utilities/load-testing/tests/firstTest.jmx +++ /dev/null @@ -1,483 +0,0 @@ - - - - - $This file is distributed under the terms of the license in /doc/license.txt$ - false - false - - - - WEBAPP_HOST - ${__property(webapp.host, localhost)} - = - - - WEBAPP_PORT - ${__property(webapp.port, 8080)} - = - - - WEBAPP_NAME - ${__property(webapp.name, vivo)} - = - - - PERSON_URI_FILE - ${__property(file.person.uris, PersonUris.csv)} - = - - - INFO_RESOURCE_URI_FILE - ${__property(file.infoResource.uris, InfoResourceUris.csv)} - = - - - ITERATIONS - ${__property(iterations, 10)} - = - - - - - - - - continue - - false - 1 - - 1 - 1 - 1293123271000 - 1293123271000 - false - - - - - - - false - rfc2109 - - - - - - - ${WEBAPP_HOST} - ${WEBAPP_PORT} - - - - - - true - - - - true - ${ITERATIONS} - - - - - - - - - - - - - ${WEBAPP_NAME}/ - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/about - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - Current thread group - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - , - false - true - false - All threads - - - - - - - - - false - testAdmin - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - true - ${ITERATIONS} - - - - - - - - - - - - - ${WEBAPP_NAME}/siteAdmin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - Current thread group - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - , - false - true - false - All threads - - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - - false - dk15 - = - true - username - - - false - Password - = - true - password - - - - - - - - - - ${WEBAPP_NAME}/programLogin - GET - true - false - true - false - false - - - - - true - ${ITERATIONS} - - - - - - - - - - - - - ${WEBAPP_NAME}/siteAdmin - GET - true - false - true - false - false - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${PERSON_URI} - GET - true - false - true - false - false - - - - - , - utf8 - ${PERSON_URI_FILE} - false - true - Current thread group - false - PERSON_URI - - - - - - - - - - - - - - ${WEBAPP_NAME}/display/${INFO_RESOURCE_URI} - GET - true - false - true - false - false - - - - - ${INFO_RESOURCE_URI_FILE} - utf8 - INFO_RESOURCE_URI - , - false - true - false - All threads - - - - - - - - - - - - - - - ${WEBAPP_NAME}/logout - GET - true - false - true - false - false - - - - - - - diff --git a/utilities/load-testing/tests/infoResourceUris.csv b/utilities/load-testing/tests/infoResourceUris.csv deleted file mode 100644 index df2f927f..00000000 --- a/utilities/load-testing/tests/infoResourceUris.csv +++ /dev/null @@ -1,3 +0,0 @@ -n432 -n4585 -n7159 diff --git a/utilities/load-testing/tests/personUris.csv b/utilities/load-testing/tests/personUris.csv deleted file mode 100644 index e5308965..00000000 --- a/utilities/load-testing/tests/personUris.csv +++ /dev/null @@ -1,9 +0,0 @@ -n3148 -n1613 -n1451 -n1748 -n2936 -n3084 -n2731 -n432 -n1048 diff --git a/utilities/load-testing/uploadFileFaker/UploadFileFaker.rb b/utilities/load-testing/uploadFileFaker/UploadFileFaker.rb deleted file mode 100644 index dcc4d125..00000000 --- a/utilities/load-testing/uploadFileFaker/UploadFileFaker.rb +++ /dev/null @@ -1,245 +0,0 @@ -#! /usr/bin/ruby - -=begin --------------------------------------------------------------------------------- - -Take a file that MySQL produced listing the URIs and filenames of all expected -upload files. Scan through the uploads directory, creating such files wherever -they are needed. - --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -=end -$: << File.dirname(File.expand_path(__FILE__)) -require 'date' -require 'fileutils' -require 'property_file_reader' - - -# ------------------------------------------------------------------------------------ -# FileInfoFile class -# ------------------------------------------------------------------------------------ - -class FileInfoFile - attr_reader :default_namespace - attr_reader :data - - def parse_info_line(line) - # Lines are in this form: "URI","filename" - match = line.match(/^"([^"]*)","([^"]*)"$/) - raise "Can't parse this line: '#{line}'" if !match - return match.captures[0], match.captures[1] - end - - def parse_default_namespace(uri) - match = /^(.*)individual/.match(uri) - raise "Can't find default namespace: '#{uri}'" if match == nil - "#{match.captures[0]}individual/" - end - - public - - def initialize(filepath) - @data = [] - File.open(filepath) do |f| - f.each() do |line| - @data.push(parse_info_line(line)) - end - end - puts "parsed #{@data.length} lines." - - @default_namespace = parse_default_namespace(@data[0][0]) - puts "default namespace is '#{@default_namespace}'" - end -end - -# ------------------------------------------------------------------------------------ -# NamespacesFile class -# -# Read, query, modify and write the namespace-prefixes file. -# ------------------------------------------------------------------------------------ - -class NamespacesFile - NAMESPACES_FILENAME = 'file_storage_namespaces.properties' - - public - - def initialize(uploads_directory, scan_only) - @uploads_directory = uploads_directory - @scan_only = scan_only - - Dir.chdir(@uploads_directory) do |dir| - @namespaces = {} - if File.file?(NAMESPACES_FILENAME) - @namespaces = PropertyFileReader.read(NAMESPACES_FILENAME) - @namespaces.delete("properties_file_path") - end - end - end - - def add_namespace(namespace) - if @namespaces.has_value?(namespace) - puts "found prefix for #{namespace}" - return - end - - 'abcdefghijklmnopqrstuvwxyz'.split("").each do |this_char| - if (!@namespaces.has_key?(this_char)) - @namespaces[this_char] = namespace - puts "assigned prefix = '#{this_char}'" - return - end - end - raise "all prefixes are used!" - end - - def prefix(namespace) - @namespaces.each() do | key, value | - return key if value == namespace - end - raise "no prefix for '#{namespace}'" - end - - def write() - if @scan_only - puts "Scan-only: not writing namespaces file" - else - Dir.chdir(@uploads_directory) do |dir| - File.open(NAMESPACES_FILENAME, "w") do |f| - @namespaces.each do |prefix, namespace| - f.puts "#{prefix} = #{namespace}" - end - end - end - end - end -end - -# ------------------------------------------------------------------------------------ -# Main class - UploadFileFaker -# ------------------------------------------------------------------------------------ - -class UploadFileFaker - # - # Do we have any chance of succeeding with these properties? - # - def sanity_checks_on_properties() - raise("Properties file must contain a value for 'uploads_directory'") if @uploads_directory == nil - raise("Properties file must contain a value for 'file_info_file'") if @file_info_file == nil - raise("Properties file must contain a value for 'template_file'") if @template_file == nil - - if !File.directory?(@uploads_directory) - raise "Not a directory: '#{@uploads_directory}'." - end - if !File.file?(@file_info_file) - raise "File does not exist: '#{@file_info_file}'." - end - if !File.file?(@template_file) - raise "File does not exist: '#{@template_file}'." - end - end - - # - # Check each location that should contain an image, and if we're not just - # scanning, put one there. - # - def create_image_files_where_needed() - @file_info.data.each do |line| - uri, filename = line - process_file_info(uri, filename) - end - end - - def process_file_info(uri, filename) - full_path = figure_full_path(uri, filename) - - if File.file?(full_path) - puts "File already exists at: '#{full_path}'" - elsif @scan_only - puts "Scan only - no file at: '#{full_path}'" - else - puts "Creating file at: '#{full_path}'" - FileUtils.mkpath(File.dirname(full_path)) - FileUtils.cp(@template_file, full_path) - end - end - - def figure_full_path(uri, filename) - prefixed_uri = substitute_prefix_for_namespace(uri) - construct_full_path(prefixed_uri, filename) - end - - def substitute_prefix_for_namespace(uri) - if uri[0, @namespace.length] == @namespace - uri.sub(@namespace, "#{@prefix}~") - else - raise "Doesn't start with default namespace: '#{uri}'" - end - end - - def construct_full_path(prefixed_uri, filename) - path = "" - 0.step(prefixed_uri.size - 1, 3) do |i| - path = "#{path}/#{prefixed_uri[i, 3]}" - end - "#{@uploads_directory}/file_storage_root#{path}/#{filename}" - end - - public - - # - # Setup and get ready to process. - # - # properties is a map of keys to values, probably parsed from a properties file. - # - def initialize(properties) - scan_only_string = properties['scan_only'] - @scan_only = 'false' != scan_only_string - - @uploads_directory = properties['uploads_directory'] - @file_info_file = properties['file_info_file'] - @template_file = properties['template_file'] - - sanity_checks_on_properties() - end - - # - # Start the scanning (and copying). - # - def process() - @file_info = FileInfoFile.new(@file_info_file) - @namespace = @file_info.default_namespace - - namespaces_file = NamespacesFile.new(@uploads_directory, @scan_only) - namespaces_file.add_namespace(@namespace) - namespaces_file.write() - @prefix = namespaces_file.prefix(@namespace) - - create_image_files_where_needed() - end -end - -# -# ------------------------------------------------------------------------------------ -# Standalone calling. -# -# Do this if this program was called from the command line. That is, if the command -# expands to the path of this file. -# ------------------------------------------------------------------------------------ -# - -if File.expand_path($0) == File.expand_path(__FILE__) - if ARGV.length == 0 - raise("No arguments - usage is: UploadFileFaker.rb ") - end - if !File.file?(ARGV[0]) - raise "File does not exist: '#{ARGV[0]}'." - end - - properties = PropertyFileReader.read(ARGV[0]) - - uff = UploadFileFaker.new(properties) - uff.process - - puts "UploadFileFaker was successful." -end diff --git a/utilities/load-testing/uploadFileFaker/property_file_reader.rb b/utilities/load-testing/uploadFileFaker/property_file_reader.rb deleted file mode 100644 index 8b3c29b5..00000000 --- a/utilities/load-testing/uploadFileFaker/property_file_reader.rb +++ /dev/null @@ -1,39 +0,0 @@ -=begin --------------------------------------------------------------------------------- - -A utility class that reads a properties file and returns a hash containing the -properties. - --------------------------------------------------------------------------------- -=end - -class PropertyFileReader - # Read a properties file and return a hash. - # - # Parameters: the path to the properties file - # - # The hash includes the special property "properties_file_path", which holds - # the path to the properties file. - # - def self.read(file_path) - properties = {} - properties["properties_file_path"] = File.expand_path(file_path) - - File.open(file_path) do |file| - file.each_line do |line| - line.strip! - if line.length == 0 || line[0] == ?# || line[0] == ?! - # ignore blank lines, and lines starting with '#' or '!'. - elsif line =~ /(.*?)\s*[=:]\s*(.*)/ - # key and value are separated by '=' or ':' and optional whitespace. - properties[$1.strip] = $2 - else - # No '=' or ':' means that the value is empty. - properties[line] = '' - end - end - end - - return properties - end -end