moving test files into log dir

This commit is contained in:
Jonathan Shook 2020-02-24 09:45:05 -06:00
parent 363c841f2d
commit 8d0008f28d
7 changed files with 22 additions and 13 deletions

View File

@ -6,7 +6,8 @@ a matching set of histogram or timer metrics, at some interval you specify.
### Example
~~~
histostatslogger.logHistoStats("test run 42", ".*", "histostats.csv", "0.5s");
histostatslogger.logHistoStats("test run 42", ".*", "logs/histostats
.csv", "0.5s");
~~~
The arguments to logHistoStats are:

View File

@ -130,7 +130,8 @@ public class AsyncScriptIntegrationTests {
@Test
public void testExtensionCsvLogger() {
ScenarioResult scenarioResult = runScenario("extension_csvmetrics");
assertThat(scenarioResult.getIOLog()).contains("started new csvlogger: csvmetricstestdir");
assertThat(scenarioResult.getIOLog()).contains("started new " +
"csvlogger: logs/csvmetricstestdir");
}
@ -147,8 +148,10 @@ public class AsyncScriptIntegrationTests {
@Test
public void testExtensionHistoStatsLogger() throws IOException {
ScenarioResult scenarioResult = runScenario("extension_histostatslogger");
assertThat(scenarioResult.getIOLog()).contains("stdout started logging to histostats.csv");
List<String> strings = Files.readAllLines(Paths.get("histostats.csv"));
assertThat(scenarioResult.getIOLog()).contains("stdout started " +
"logging to logs/histostats.csv");
List<String> strings = Files.readAllLines(Paths.get(
"logs/histostats.csv"));
String logdata = strings.stream().collect(Collectors.joining("\n"));
assertThat(logdata).contains("min,p25,p50,p75,p90,p95,");
assertThat(logdata.split("Tag=testhistostatslogger.cycles.servicetime,").length).isGreaterThanOrEqualTo(3);

View File

@ -133,7 +133,8 @@ public class ScriptIntegrationTests {
@Test
public void testExtensionCsvLogger() {
ScenarioResult scenarioResult = runScenario("extension_csvmetrics");
assertThat(scenarioResult.getIOLog()).contains("started new csvlogger: csvmetricstestdir");
assertThat(scenarioResult.getIOLog()).contains("started new " +
"csvlogger: logs/csvmetricstestdir");
}
@ -150,8 +151,10 @@ public class ScriptIntegrationTests {
@Test
public void testExtensionHistoStatsLogger() throws IOException {
ScenarioResult scenarioResult = runScenario("extension_histostatslogger");
assertThat(scenarioResult.getIOLog()).contains("stdout started logging to histostats.csv");
List<String> strings = Files.readAllLines(Paths.get("histostats.csv"));
assertThat(scenarioResult.getIOLog()).contains("stdout started " +
"logging to logs/histostats.csv");
List<String> strings = Files.readAllLines(Paths.get(
"logs/histostats.csv"));
String logdata = strings.stream().collect(Collectors.joining("\n"));
assertThat(logdata).contains("min,p25,p50,p75,p90,p95,");
assertThat(logdata.split("Tag=testhistostatslogger.cycles.servicetime,").length).isGreaterThanOrEqualTo(3);

View File

@ -15,7 +15,7 @@
* /
*/
var csvlogger = csvmetrics.log("csvmetricstestdir");
var csvlogger = csvmetrics.log("logs/csvmetricstestdir");
activitydef = {
"alias" : "csvmetrics",

View File

@ -25,8 +25,9 @@ activitydef = {
"async" : "1000"
};
histostatslogger.logHistoStats("testing extention histostatslogger", ".*", "histostats.csv", "0.5s");
print("started logging to histostats.csv for all metrics at 1/2 second intervals.");
histostatslogger.logHistoStats("testing extention histostatslogger", ".*", "logs/histostats.csv", "0.5s");
print("started logging to logs/histostats.csv for all metrics at 1/2" +
" second intervals.");
scenario.start(activitydef);
scenario.waitMillis(2000);

View File

@ -1,4 +1,4 @@
var csvlogger = csvmetrics.log("csvmetricstestdir");
var csvlogger = csvmetrics.log("logs/csvmetricstestdir");
activitydef = {
"alias" : "csvmetrics",

View File

@ -7,8 +7,9 @@ activitydef = {
"targetrate" : "10000.0"
};
histostatslogger.logHistoStats("testing extention histostatslogger", ".*", "histostats.csv", "0.5s");
print("started logging to histostats.csv for all metrics at 1/2 second intervals.");
histostatslogger.logHistoStats("testing extention histostatslogger", ".*", "logs/histostats.csv", "0.5s");
print("started logging to logs/histostats.csv for all metrics at 1/2" +
" second intervals.");
scenario.start(activitydef);
scenario.waitMillis(2000);