fixed name clash on integrated test

This commit is contained in:
Jonathan Shook 2020-04-02 02:45:07 -05:00
parent fc25a2b4eb
commit fb8c85a222
5 changed files with 36 additions and 36 deletions

View File

@ -245,13 +245,13 @@ public class AsyncScriptIntegrationTests {
}
@Test
@Ignore
public void testCycleRateChangeOldMetrics() {
ScenarioResult scenarioResult = runScenario("cycle_rate_change_deprecated");
String ioLog = scenarioResult.getIOLog();
assertThat(ioLog).contains("cycles adjusted, exiting on iteration");
}
// @Test
// @Ignore
// public void testCycleRateChangeOldMetrics() {
// ScenarioResult scenarioResult = runScenario("cycle_rate_change_deprecated");
// String ioLog = scenarioResult.getIOLog();
// assertThat(ioLog).contains("cycles adjusted, exiting on iteration");
// }
@Test
public void testCycleRateChangeNewMetrics() {

View File

@ -66,7 +66,7 @@ public class ScriptIntegrationTests {
@Test
public void testCycleRate() {
ScenarioResult scenarioResult = runScenario("cycle_rate");
ScenarioResult scenarioResult = runScenario("sync_cycle_rate");
String iolog = scenarioResult.getIOLog();
System.out.println("iolog\n" + iolog);
Pattern p = Pattern.compile(".*mean cycle rate = (\\d[.\\d]+).*", Pattern.DOTALL);

View File

@ -15,8 +15,8 @@
* /
*/
cycle_rate = {
"alias" : "cycle_rate",
cycle_rate_change = {
"alias" : "cycle_rate_change",
"type" : "diag",
"cycles" : "0..1000000",
"threads" : "10",
@ -25,29 +25,29 @@ cycle_rate = {
"async" : "1000"
};
print('starting cycle_rate');
scenario.start(cycle_rate);
print('starting cycle_rate_change');
scenario.start(cycle_rate_change);
print('started');
print('cyclerate at 0ms:' + activities.cycle_rate.cyclerate);
print('cyclerate at 0ms:' + activities.cycle_rate_change.cyclerate);
scenario.waitMillis(1000);
activities.cycle_rate.cyclerate='50000';
activities.cycle_rate_change.cyclerate='50000';
print("measured cycle increment per second is expected to adjust to 50000");
print('cyclerate now:' + activities.cycle_rate.cyclerate);
print('cyclerate now:' + activities.cycle_rate_change.cyclerate);
var lastcount=metrics.cycle_rate.cycles.servicetime.count;
var lastcount=metrics.cycle_rate_change.cycles.servicetime.count;
for(i=0;i<20;i++) {
scenario.waitMillis(1000);
var nextcount=metrics.cycle_rate.cycles.servicetime.count;
var nextcount=metrics.cycle_rate_change.cycles.servicetime.count;
var cycles = (nextcount - lastcount);
print("new this second: " + (nextcount - lastcount));
print(" waittime: " + metrics.cycle_rate.cycles.waittime.value);
print(" waittime: " + metrics.cycle_rate_change.cycles.waittime.value);
lastcount=nextcount;
if (cycles>49000 && cycles<51000) {
print("cycles adjusted, exiting on iteration " + i);
break;
}
}
print('cycle_rate activity finished');
print('cycle_rate_change activity finished');

View File

@ -1,17 +0,0 @@
activitydef = {
"alias" : "cycle_rate",
"type" : "diag",
"cycles" : "5K",
"threads" : "10",
"cyclerate" : "1K",
"phases" : 15
};
scenario.run(activitydef);
print("current cycle = " + metrics.cycle_rate.cycles.servicetime.count);
print("mean cycle rate = " + metrics.cycle_rate.cycles.servicetime.meanRate);

View File

@ -0,0 +1,17 @@
activitydef = {
"alias" : "sync_cycle_rate",
"type" : "diag",
"cycles" : "5K",
"threads" : "10",
"cyclerate" : "1K",
"phases" : 15
};
scenario.run(activitydef);
print("current cycle = " + metrics.sync_cycle_rate.cycles.servicetime.count);
print("mean cycle rate = " + metrics.sync_cycle_rate.cycles.servicetime.meanRate);