Search in sources :

Example 1 with Benchmark

use of alluxio.stress.cli.Benchmark in project alluxio by Alluxio.

the class JobServiceMaxThroughput method runSingleTest.

@Override
protected JobServiceBenchSummary runSingleTest(List<String> args) throws Exception {
    Benchmark b = new StressJobServiceBench();
    String result = b.run(args.toArray(new String[0]));
    return JsonSerializable.fromJson(result, new JobServiceBenchSummary[0]);
}
Also used : StressJobServiceBench(alluxio.stress.cli.StressJobServiceBench) Benchmark(alluxio.stress.cli.Benchmark)

Example 2 with Benchmark

use of alluxio.stress.cli.Benchmark in project alluxio by Alluxio.

the class MaxThroughput method createFiles.

/**
 * @param numFiles number of files to create with each task
 * @param args the args
 */
private void createFiles(long numFiles, List<String> args) throws Exception {
    List<String> newArgs = new ArrayList<>(args);
    updateArgValue(newArgs, "--operation", Operation.CREATE_FILE.toString());
    updateArgValue(newArgs, "--warmup", "0s");
    updateArgValue(newArgs, "--threads", "128");
    updateArgValue(newArgs, "--stop-count", Long.toString(numFiles));
    updateArgValue(newArgs, "--target-throughput", "10000");
    LOG.info(String.format("Preparing %d files. args: %s", numFiles, String.join(" ", newArgs)));
    Benchmark b = new StressMasterBench();
    String result = b.run(newArgs.toArray(new String[0]));
    MasterBenchSummary summary = JsonSerializable.fromJson(result, new MasterBenchSummary[0]);
    if (!summary.collectErrorsFromAllNodes().isEmpty()) {
        throw new IllegalStateException(String.format("Could not create files for operation (%s). error: %s", mParameters.mOperation, summary.collectErrorsFromAllNodes().iterator().next()));
    }
}
Also used : StressMasterBench(alluxio.stress.cli.StressMasterBench) ArrayList(java.util.ArrayList) Benchmark(alluxio.stress.cli.Benchmark) MasterBenchSummary(alluxio.stress.master.MasterBenchSummary)

Example 3 with Benchmark

use of alluxio.stress.cli.Benchmark in project alluxio by Alluxio.

the class MaxThroughput method runSingleTest.

/**
 * @param requiredCount the number of operations that may happen for a successful run
 * @param args the args
 * @return the results
 */
private MasterBenchSummary runSingleTest(long requiredCount, List<String> args) throws Exception {
    prepareBeforeSingleTest(requiredCount, args);
    Benchmark b = new StressMasterBench();
    String result = b.run(args.toArray(new String[0]));
    return JsonSerializable.fromJson(result, new MasterBenchSummary[0]);
}
Also used : StressMasterBench(alluxio.stress.cli.StressMasterBench) Benchmark(alluxio.stress.cli.Benchmark)

Aggregations

Benchmark (alluxio.stress.cli.Benchmark)3 StressMasterBench (alluxio.stress.cli.StressMasterBench)2 StressJobServiceBench (alluxio.stress.cli.StressJobServiceBench)1 MasterBenchSummary (alluxio.stress.master.MasterBenchSummary)1 ArrayList (java.util.ArrayList)1