mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
move op remappers up to DriverAdapter
This commit is contained in:
@@ -89,6 +89,7 @@ public abstract class BaseDriverAdapter<R extends Op,S> implements DriverAdapter
|
||||
* Each function is applied to the op template fields. </p>
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Function<Map<String,Object>,Map<String,Object>>> getOpFieldRemappers() {
|
||||
return List.of();
|
||||
}
|
||||
@@ -132,6 +133,7 @@ public abstract class BaseDriverAdapter<R extends Op,S> implements DriverAdapter
|
||||
.add(Param.optional(List.of("cyclerate", "targetrate", "rate"), String.class, "rate limit for cycles per second"))
|
||||
.add(Param.optional("phaserate", String.class, "rate limit for phases per second"))
|
||||
.add(Param.optional("seq", String.class, "sequencing algorithm"))
|
||||
.add(Param.optional("instrument", Boolean.class))
|
||||
.asReadOnly();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.content.Content;
|
||||
import io.nosqlbench.nb.api.content.NBIO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
@@ -125,6 +126,10 @@ public interface DriverAdapter<R extends Op, S> {
|
||||
return t -> t.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
default List<Function<Map<String,Object>,Map<String,Object>>> getOpFieldRemappers() {
|
||||
return List.of(f -> f);
|
||||
}
|
||||
|
||||
/**
|
||||
* The cache of all objects needed within a single instance
|
||||
* of a DriverAdapter which are not operations. These are generally
|
||||
|
||||
Reference in New Issue
Block a user