mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
moving test files into log dir
This commit is contained in:
parent
363c841f2d
commit
8d0008f28d
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* /
|
||||
*/
|
||||
|
||||
var csvlogger = csvmetrics.log("csvmetricstestdir");
|
||||
var csvlogger = csvmetrics.log("logs/csvmetricstestdir");
|
||||
|
||||
activitydef = {
|
||||
"alias" : "csvmetrics",
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
var csvlogger = csvmetrics.log("csvmetricstestdir");
|
||||
var csvlogger = csvmetrics.log("logs/csvmetricstestdir");
|
||||
|
||||
activitydef = {
|
||||
"alias" : "csvmetrics",
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user