Search in sources :

Example 1 with FixedOpDistribution

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);
        }
    };
}
Also used : Timer(org.apache.cassandra.stress.report.Timer) SeedManager(org.apache.cassandra.stress.generate.SeedManager) OpDistributionFactory(org.apache.cassandra.stress.operations.OpDistributionFactory) MeasurementSink(org.apache.cassandra.stress.StressAction.MeasurementSink) FixedOpDistribution(org.apache.cassandra.stress.operations.FixedOpDistribution)

Aggregations

MeasurementSink (org.apache.cassandra.stress.StressAction.MeasurementSink)1 SeedManager (org.apache.cassandra.stress.generate.SeedManager)1 FixedOpDistribution (org.apache.cassandra.stress.operations.FixedOpDistribution)1 OpDistributionFactory (org.apache.cassandra.stress.operations.OpDistributionFactory)1 Timer (org.apache.cassandra.stress.report.Timer)1