mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
clarify opData meaning
This commit is contained in:
@@ -79,7 +79,7 @@ public class CqlAsyncAction extends BaseAsyncAction<CqlOpData, CqlActivity> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startOpCycle(TrackedOp<CqlOpData> opc) {
|
public void startOpCycle(TrackedOp<CqlOpData> opc) {
|
||||||
CqlOpData cqlop = opc.getData();
|
CqlOpData cqlop = opc.getOpData();
|
||||||
long cycle = opc.getCycle();
|
long cycle = opc.getCycle();
|
||||||
|
|
||||||
// bind timer covers all statement selection and binding, skipping, transforming logic
|
// bind timer covers all statement selection and binding, skipping, transforming logic
|
||||||
@@ -123,7 +123,7 @@ public class CqlAsyncAction extends BaseAsyncAction<CqlOpData, CqlActivity> {
|
|||||||
|
|
||||||
|
|
||||||
public void onSuccess(StartedOp<CqlOpData> sop) {
|
public void onSuccess(StartedOp<CqlOpData> sop) {
|
||||||
CqlOpData cqlop = sop.getData();
|
CqlOpData cqlop = sop.getOpData();
|
||||||
|
|
||||||
HashedCQLErrorHandler.resetThreadStatusCode();
|
HashedCQLErrorHandler.resetThreadStatusCode();
|
||||||
if (cqlop.skipped) {
|
if (cqlop.skipped) {
|
||||||
@@ -217,7 +217,7 @@ public class CqlAsyncAction extends BaseAsyncAction<CqlOpData, CqlActivity> {
|
|||||||
|
|
||||||
public void onFailure(StartedOp<CqlOpData> startedOp) {
|
public void onFailure(StartedOp<CqlOpData> startedOp) {
|
||||||
|
|
||||||
CqlOpData cqlop = startedOp.getData();
|
CqlOpData cqlop = startedOp.getOpData();
|
||||||
long serviceTime = startedOp.getCurrentServiceTimeNanos();
|
long serviceTime = startedOp.getCurrentServiceTimeNanos();
|
||||||
|
|
||||||
// Even if this is retryable, we expose error events
|
// Even if this is retryable, we expose error events
|
||||||
|
|||||||
@@ -151,8 +151,8 @@ public class AsyncDiagAction extends BaseAsyncAction<DiagOpData, DiagActivity> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startOpCycle(TrackedOp<DiagOpData> opc) {
|
public void startOpCycle(TrackedOp<DiagOpData> opc) {
|
||||||
opc.getData().log("starting at " + System.nanoTime());
|
opc.getOpData().log("starting at " + System.nanoTime());
|
||||||
opc.getData().setSimulatedDelayNanos(delayFunc.applyAsLong(opc.getCycle()));
|
opc.getOpData().setSimulatedDelayNanos(delayFunc.applyAsLong(opc.getCycle()));
|
||||||
StartedOp<DiagOpData> started = opc.start();
|
StartedOp<DiagOpData> started = opc.start();
|
||||||
opQueue.add(started);
|
opQueue.add(started);
|
||||||
}
|
}
|
||||||
@@ -239,7 +239,7 @@ public class AsyncDiagAction extends BaseAsyncAction<DiagOpData, DiagActivity> i
|
|||||||
try {
|
try {
|
||||||
opc=queue.take();
|
opc=queue.take();
|
||||||
|
|
||||||
DiagOpData op = opc.getData();
|
DiagOpData op = opc.getOpData();
|
||||||
long now = System.nanoTime();
|
long now = System.nanoTime();
|
||||||
long simulatedCompletionTime = opc.getStartedAtNanos() + op.getSimulatedDelayNanos();
|
long simulatedCompletionTime = opc.getStartedAtNanos() + op.getSimulatedDelayNanos();
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ public class AsyncDiagAction extends BaseAsyncAction<DiagOpData, DiagActivity> i
|
|||||||
logger.info("processing stride output for " + completedOps.get(0).getCycle());
|
logger.info("processing stride output for " + completedOps.get(0).getCycle());
|
||||||
long start = completedOps.get(0).getCycle();
|
long start = completedOps.get(0).getCycle();
|
||||||
long endPlus = completedOps.get(completedOps.size()-1).getCycle()+1;
|
long endPlus = completedOps.get(completedOps.size()-1).getCycle()+1;
|
||||||
String diagLog = completedOps.get(0).getData().getDiagLog().stream().collect(Collectors.joining("\n"));
|
String diagLog = completedOps.get(0).getOpData().getDiagLog().stream().collect(Collectors.joining("\n"));
|
||||||
activity.getSequenceBlocker().awaitAndRun(start, endPlus, () -> logger.info(" => " + start + " -> " + endPlus + ": " + diagLog));
|
activity.getSequenceBlocker().awaitAndRun(start, endPlus, () -> logger.info(" => " + start + " -> " + endPlus + ": " + diagLog));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class OpImpl<D> implements OpFacets<D> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public D getData() {
|
public D getOpData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ package io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets;
|
|||||||
* @param <D> The type of delegate needed for the implementing protocol
|
* @param <D> The type of delegate needed for the implementing protocol
|
||||||
*/
|
*/
|
||||||
public interface Payload<D> {
|
public interface Payload<D> {
|
||||||
D getData();
|
D getOpData();
|
||||||
void setData(D data);
|
void setData(D data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user