Exemplo n.º 1
0
        public TPCCBenchmark(
            SyncExecutionBuilder builder, int workloadCountPerWorker)
        {
            this.workloadCountPerWorker = workloadCountPerWorker;

            this.tpccWorkers = InititializeWorkers(
                builder, workloadCountPerWorker);
            this.workerCount = this.tpccWorkers.Length;
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        static TPCCWorker[] InititializeWorkers(
            SyncExecutionBuilder builder, int workloadCount)
        {
            SyncExecution[] execs   = builder.BuildAll();
            var             workers = new TPCCWorker[execs.Length];

            for (int i = 0; i < workers.Length; ++i)
            {
                workers[i] = new TPCCWorker(execs[i], workloadCount);
            }
            return(workers);
        }