static private IEnumerable <WorkloadParam> GetParams( int n, WorkloadLoader loader, WorkloadBuilder builder) { if (n == 0) { return(Enumerable.Empty <WorkloadParam>()); } builder.NewStoredProcedureIfNon(); return(loader.NextColumns(n, builder.Name()) .Select(builder.BuildWorkload)); }
static TPCCBenchmark InitializeBenchmark( SyncExecutionBuilder execBuilder, int workerWorkload, string workloadDir, double paymentRatio) { TPCCBenchmark benchmark = new TPCCBenchmark(execBuilder, workerWorkload); WorkloadLoader loader = new WorkloadLoader(workloadDir); WorkloadAllocator allocator = new HybridAllocator(loader, paymentRatio); benchmark.AllocateWorkload(allocator); return(benchmark); }
public HybridAllocator(WorkloadLoader loader, double paymentRatio) : base(loader) { this.paymentRatio = paymentRatio; }
public WorkloadAllocator(WorkloadLoader loader) { this.paymentBuilder = new PaymentWorkloadBuilder(); this.newOrderBuilder = new NewOrderWorkloadBuilder(); this.loader = loader; }