update integrated tests to use new metrics names

This commit is contained in:
Jonathan Shook 2023-08-28 16:14:22 -05:00
parent 1203750d2e
commit 5cc0a51fc8
7 changed files with 27 additions and 27 deletions

View File

@ -158,7 +158,7 @@ public class ScriptExampleTests {
"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(1);
assertThat(logdata.split("Tag=testhistostatslogger.cycles_servicetime,").length).isGreaterThanOrEqualTo(1);
}
@Test
@ -179,7 +179,7 @@ public class ScriptExampleTests {
List<String> strings = Files.readAllLines(Paths.get("hdrhistodata.log"));
String logdata = strings.stream().collect(Collectors.joining("\n"));
assertThat(logdata).contains(",HIST");
assertThat(logdata.split("Tag=testhistologger.cycles.servicetime,").length).isGreaterThanOrEqualTo(1);
assertThat(logdata.split("Tag=testhistologger.cycles_servicetime,").length).isGreaterThanOrEqualTo(1);
}
@Test
@ -241,8 +241,8 @@ public class ScriptExampleTests {
@Test
public void testReportedCoDelayStrict() {
ExecutionMetricsResult scenarioResult = runScenario("cocycledelay_strict");
assertThat(scenarioResult.getIOLog()).contains("step1 cycles.waittime=");
assertThat(scenarioResult.getIOLog()).contains("step2 cycles.waittime=");
assertThat(scenarioResult.getIOLog()).contains("step1 cycles_waittime=");
assertThat(scenarioResult.getIOLog()).contains("step2 cycles_waittime=");
String iolog = scenarioResult.getIOLog();
System.out.println(iolog);
// TODO: ensure that waittime is staying the same or increasing

View File

@ -31,13 +31,13 @@ for (i = 0; i < 5; i++) {
print("scenario exited prematurely, aborting.");
break;
}
print("backlogging, cycles=" + metrics.co_cycle_delay_bursty.cycles.servicetime.count +
" waittime=" + metrics.co_cycle_delay_bursty.cycles.waittime.value +
print("backlogging, cycles=" + metrics.co_cycle_delay_bursty.cycles_servicetime.count +
" waittime=" + metrics.co_cycle_delay_bursty.cycles_waittime.value +
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
" cyclerate=" + activities.co_cycle_delay_bursty.cyclerate
);
}
print('step1 metrics.waittime=' + metrics.co_cycle_delay_bursty.cycles.waittime.value);
print('step1 metrics.waittime=' + metrics.co_cycle_delay_bursty.cycles_waittime.value);
activities.co_cycle_delay_bursty.diagrate = "10000";
for (i = 0; i < 10; i++) {
@ -45,19 +45,19 @@ for (i = 0; i < 10; i++) {
print("scenario exited prematurely, aborting.");
break;
}
print("recovering, cycles=" + metrics.co_cycle_delay_bursty.cycles.servicetime.count +
" waittime=" + metrics.co_cycle_delay_bursty.cycles.waittime.value +
print("recovering, cycles=" + metrics.co_cycle_delay_bursty.cycles_servicetime.count +
" waittime=" + metrics.co_cycle_delay_bursty.cycles_waittime.value +
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
" cyclerate=" + activities.co_cycle_delay_bursty.cyclerate
);
scenario.waitMillis(1000);
if (metrics.co_cycle_delay_bursty.cycles.waittime.value < 50000000) {
if (metrics.co_cycle_delay_bursty.cycles_waittime.value < 50000000) {
print("waittime trended back down as expected, exiting on iteration " + i);
break;
}
}
//scenario.awaitActivity("co_cycle_delay");
print('step2 metrics.waittime=' + metrics.co_cycle_delay_bursty.cycles.waittime.value);
print('step2 metrics.waittime=' + metrics.co_cycle_delay_bursty.cycles_waittime.value);
scenario.stop(co_cycle_delay_bursty);
print("stopped activity co_cycle_delay_bursty");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 nosqlbench
* Copyright (c) 2022-2023 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,18 +26,18 @@ co_cycle_delay = {
print('starting activity co_cycle_delay');
scenario.start(co_cycle_delay);
scenario.waitMillis(4000);
print('step1 cycles.waittime=' + metrics.co_cycle_delay.cycles.waittime.value);
print('step1 cycles_waittime=' + metrics.co_cycle_delay.cycles_waittime.value);
activities.co_cycle_delay.diagrate="10000";
for(i=0;i<5;i++) {
if (! scenario.isRunningActivity('co_cycle_delay')) {
print("scenario exited prematurely, aborting.");
break;
}
print("iteration " + i + " waittime now " + metrics.co_cycle_delay.cycles.waittime.value);
print("iteration " + i + " waittime now " + metrics.co_cycle_delay.cycles_waittime.value);
scenario.waitMillis(1000);
}
//scenario.awaitActivity("co_cycle_delay");
print('step2 cycles.waittime=' + metrics.co_cycle_delay.cycles.waittime.value);
print('step2 cycles_waittime=' + metrics.co_cycle_delay.cycles_waittime.value);
print("awaited activity");

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2022 nosqlbench
* Copyright (c) 2022-2023 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,8 +26,8 @@ activitydef = {
scenario.run(activitydef);
print("current cycle = " + metrics.cycle_rate.cycles.servicetime.count);
print("mean cycle rate = " + metrics.cycle_rate.cycles.servicetime.meanRate);
print("current cycle = " + metrics.cycle_rate.cycles_servicetime.count);
print("mean cycle rate = " + metrics.cycle_rate.cycles_servicetime.meanRate);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 nosqlbench
* Copyright (c) 2022-2023 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,13 +34,13 @@ print("measured cycle increment per second is expected to adjust to 1000");
print('cyclerate now:' + activities.cycle_rate_change.cyclerate);
var lastcount=metrics.cycle_rate_change.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_change.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_change.cycles.waittime.value);
print(" waittime: " + metrics.cycle_rate_change.cycles_waittime.value);
lastcount=nextcount;
if (cycles>700 && cycles<1300) {
print("cycles adjusted, exiting on iteration " + i);

View File

@ -27,7 +27,7 @@ activitydef = {
scenario.start(activitydef);
scenario.waitMillis(500);
csvlogger.add(metrics.csvmetrics.cycles.servicetime);
csvlogger.add(metrics.csvmetrics.cycles_servicetime);
csvlogger.start(500,"MILLISECONDS");
scenario.waitMillis(2000);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 nosqlbench
* Copyright (c) 2022-2023 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,10 +26,10 @@ activitydef = {
scenario.start(activitydef);
scenario.waitMillis(500);
while (metrics.testactivity.cycles.servicetime.count < 1000) {
print('waiting 10ms because cycles<10000 : ' + metrics.testactivity.cycles.servicetime.count);
while (metrics.testactivity.cycles_servicetime.count < 1000) {
print('waiting 10ms because cycles<10000 : ' + metrics.testactivity.cycles_servicetime.count);
scenario.waitMillis(10);
}
scenario.stop(activitydef);
print("count: " + metrics.testactivity.cycles.servicetime.count);
print("count: " + metrics.testactivity.cycles_servicetime.count);