use of org.apache.cassandra.stress.operations.FixedOpDistribution in project cassandra by apache.
the class SettingsCommandPreDefined method getFactory.
public OpDistributionFactory getFactory(final StressSettings settings) {
final SeedManager seeds = new SeedManager(settings);
return new OpDistributionFactory() {
public OpDistribution get(boolean isWarmup, MeasurementSink sink) {
final Timer timer1 = new Timer(type.toString(), sink);
final Timer timer = timer1;
return new FixedOpDistribution(PredefinedOperation.operation(type, timer, newGenerator(settings), seeds, settings, add));
}
public String desc() {
return type.toString();
}
public Iterable<OpDistributionFactory> each() {
return Collections.<OpDistributionFactory>singleton(this);
}
};
}
Aggregations