示例#1
0
 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));
 }
示例#2
0
        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);
        }
示例#3
0
 public HybridAllocator(WorkloadLoader loader, double paymentRatio) : base(loader)
 {
     this.paymentRatio = paymentRatio;
 }
示例#4
0
 public WorkloadAllocator(WorkloadLoader loader)
 {
     this.paymentBuilder  = new PaymentWorkloadBuilder();
     this.newOrderBuilder = new NewOrderWorkloadBuilder();
     this.loader          = loader;
 }