mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
update integrated tests to use new metrics names
This commit is contained in:
parent
1203750d2e
commit
5cc0a51fc8
@ -158,7 +158,7 @@ public class ScriptExampleTests {
|
|||||||
"logs/histostats.csv"));
|
"logs/histostats.csv"));
|
||||||
String logdata = strings.stream().collect(Collectors.joining("\n"));
|
String logdata = strings.stream().collect(Collectors.joining("\n"));
|
||||||
assertThat(logdata).contains("min,p25,p50,p75,p90,p95,");
|
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
|
@Test
|
||||||
@ -179,7 +179,7 @@ public class ScriptExampleTests {
|
|||||||
List<String> strings = Files.readAllLines(Paths.get("hdrhistodata.log"));
|
List<String> strings = Files.readAllLines(Paths.get("hdrhistodata.log"));
|
||||||
String logdata = strings.stream().collect(Collectors.joining("\n"));
|
String logdata = strings.stream().collect(Collectors.joining("\n"));
|
||||||
assertThat(logdata).contains(",HIST");
|
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
|
@Test
|
||||||
@ -241,8 +241,8 @@ public class ScriptExampleTests {
|
|||||||
@Test
|
@Test
|
||||||
public void testReportedCoDelayStrict() {
|
public void testReportedCoDelayStrict() {
|
||||||
ExecutionMetricsResult scenarioResult = runScenario("cocycledelay_strict");
|
ExecutionMetricsResult scenarioResult = runScenario("cocycledelay_strict");
|
||||||
assertThat(scenarioResult.getIOLog()).contains("step1 cycles.waittime=");
|
assertThat(scenarioResult.getIOLog()).contains("step1 cycles_waittime=");
|
||||||
assertThat(scenarioResult.getIOLog()).contains("step2 cycles.waittime=");
|
assertThat(scenarioResult.getIOLog()).contains("step2 cycles_waittime=");
|
||||||
String iolog = scenarioResult.getIOLog();
|
String iolog = scenarioResult.getIOLog();
|
||||||
System.out.println(iolog);
|
System.out.println(iolog);
|
||||||
// TODO: ensure that waittime is staying the same or increasing
|
// TODO: ensure that waittime is staying the same or increasing
|
||||||
|
@ -31,13 +31,13 @@ for (i = 0; i < 5; i++) {
|
|||||||
print("scenario exited prematurely, aborting.");
|
print("scenario exited prematurely, aborting.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
print("backlogging, cycles=" + metrics.co_cycle_delay_bursty.cycles.servicetime.count +
|
print("backlogging, cycles=" + metrics.co_cycle_delay_bursty.cycles_servicetime.count +
|
||||||
" waittime=" + metrics.co_cycle_delay_bursty.cycles.waittime.value +
|
" waittime=" + metrics.co_cycle_delay_bursty.cycles_waittime.value +
|
||||||
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
|
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
|
||||||
" cyclerate=" + activities.co_cycle_delay_bursty.cyclerate
|
" 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";
|
activities.co_cycle_delay_bursty.diagrate = "10000";
|
||||||
|
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
@ -45,19 +45,19 @@ for (i = 0; i < 10; i++) {
|
|||||||
print("scenario exited prematurely, aborting.");
|
print("scenario exited prematurely, aborting.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
print("recovering, cycles=" + metrics.co_cycle_delay_bursty.cycles.servicetime.count +
|
print("recovering, cycles=" + metrics.co_cycle_delay_bursty.cycles_servicetime.count +
|
||||||
" waittime=" + metrics.co_cycle_delay_bursty.cycles.waittime.value +
|
" waittime=" + metrics.co_cycle_delay_bursty.cycles_waittime.value +
|
||||||
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
|
" diagrate=" + activities.co_cycle_delay_bursty.diagrate +
|
||||||
" cyclerate=" + activities.co_cycle_delay_bursty.cyclerate
|
" cyclerate=" + activities.co_cycle_delay_bursty.cyclerate
|
||||||
);
|
);
|
||||||
|
|
||||||
scenario.waitMillis(1000);
|
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);
|
print("waittime trended back down as expected, exiting on iteration " + i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//scenario.awaitActivity("co_cycle_delay");
|
//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);
|
scenario.stop(co_cycle_delay_bursty);
|
||||||
print("stopped activity co_cycle_delay_bursty");
|
print("stopped activity co_cycle_delay_bursty");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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');
|
print('starting activity co_cycle_delay');
|
||||||
scenario.start(co_cycle_delay);
|
scenario.start(co_cycle_delay);
|
||||||
scenario.waitMillis(4000);
|
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";
|
activities.co_cycle_delay.diagrate="10000";
|
||||||
for(i=0;i<5;i++) {
|
for(i=0;i<5;i++) {
|
||||||
if (! scenario.isRunningActivity('co_cycle_delay')) {
|
if (! scenario.isRunningActivity('co_cycle_delay')) {
|
||||||
print("scenario exited prematurely, aborting.");
|
print("scenario exited prematurely, aborting.");
|
||||||
break;
|
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.waitMillis(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//scenario.awaitActivity("co_cycle_delay");
|
//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");
|
print("awaited activity");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -26,8 +26,8 @@ activitydef = {
|
|||||||
|
|
||||||
scenario.run(activitydef);
|
scenario.run(activitydef);
|
||||||
|
|
||||||
print("current cycle = " + metrics.cycle_rate.cycles.servicetime.count);
|
print("current cycle = " + metrics.cycle_rate.cycles_servicetime.count);
|
||||||
print("mean cycle rate = " + metrics.cycle_rate.cycles.servicetime.meanRate);
|
print("mean cycle rate = " + metrics.cycle_rate.cycles_servicetime.meanRate);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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);
|
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++) {
|
for(i=0;i<20;i++) {
|
||||||
scenario.waitMillis(1000);
|
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);
|
var cycles = (nextcount - lastcount);
|
||||||
print("new this second: " + (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;
|
lastcount=nextcount;
|
||||||
if (cycles>700 && cycles<1300) {
|
if (cycles>700 && cycles<1300) {
|
||||||
print("cycles adjusted, exiting on iteration " + i);
|
print("cycles adjusted, exiting on iteration " + i);
|
||||||
|
@ -27,7 +27,7 @@ activitydef = {
|
|||||||
scenario.start(activitydef);
|
scenario.start(activitydef);
|
||||||
scenario.waitMillis(500);
|
scenario.waitMillis(500);
|
||||||
|
|
||||||
csvlogger.add(metrics.csvmetrics.cycles.servicetime);
|
csvlogger.add(metrics.csvmetrics.cycles_servicetime);
|
||||||
csvlogger.start(500,"MILLISECONDS");
|
csvlogger.start(500,"MILLISECONDS");
|
||||||
|
|
||||||
scenario.waitMillis(2000);
|
scenario.waitMillis(2000);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -26,10 +26,10 @@ activitydef = {
|
|||||||
scenario.start(activitydef);
|
scenario.start(activitydef);
|
||||||
|
|
||||||
scenario.waitMillis(500);
|
scenario.waitMillis(500);
|
||||||
while (metrics.testactivity.cycles.servicetime.count < 1000) {
|
while (metrics.testactivity.cycles_servicetime.count < 1000) {
|
||||||
print('waiting 10ms because cycles<10000 : ' + metrics.testactivity.cycles.servicetime.count);
|
print('waiting 10ms because cycles<10000 : ' + metrics.testactivity.cycles_servicetime.count);
|
||||||
scenario.waitMillis(10);
|
scenario.waitMillis(10);
|
||||||
|
|
||||||
}
|
}
|
||||||
scenario.stop(activitydef);
|
scenario.stop(activitydef);
|
||||||
print("count: " + metrics.testactivity.cycles.servicetime.count);
|
print("count: " + metrics.testactivity.cycles_servicetime.count);
|
||||||
|
Loading…
Reference in New Issue
Block a user