MCPcopy Create free account
hub / github.com/cmu-db/benchbase / runWorkload

Method runWorkload

src/main/java/com/oltpbenchmark/DBWorkload.java:781–800  ·  view source on GitHub ↗
(List<BenchmarkModule> benchList, MonitorInfo monitorInfo)

Source from the content-addressed store, hash-verified

779 }
780
781 private static Results runWorkload(List<BenchmarkModule> benchList, MonitorInfo monitorInfo)
782 throws IOException {
783 List<Worker<?>> workers = new ArrayList<>();
784 List<WorkloadConfiguration> workConfs = new ArrayList<>();
785 for (BenchmarkModule bench : benchList) {
786 LOG.info("Creating {} virtual terminals...", bench.getWorkloadConfiguration().getTerminals());
787 workers.addAll(bench.makeWorkers());
788
789 int num_phases = bench.getWorkloadConfiguration().getNumberOfPhases();
790 LOG.info(
791 String.format(
792 "Launching the %s Benchmark with %s Phase%s...",
793 bench.getBenchmarkName().toUpperCase(), num_phases, (num_phases > 1 ? "s" : "")));
794 workConfs.add(bench.getWorkloadConfiguration());
795 }
796 Results r = ThreadBench.runRateLimitedBenchmark(workers, workConfs, monitorInfo);
797 LOG.info(SINGLE_LINE);
798 LOG.info("Rate limited reqs/s: {}", r);
799 return r;
800 }
801
802 private static void printUsage(Options options) {
803 HelpFormatter hlpfrmt = new HelpFormatter();

Callers 1

mainMethod · 0.95

Calls 9

getTerminalsMethod · 0.80
makeWorkersMethod · 0.80
getNumberOfPhasesMethod · 0.80
formatMethod · 0.80
addMethod · 0.80
addAllMethod · 0.45
getBenchmarkNameMethod · 0.45

Tested by

no test coverage detected