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]);
}
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()));
}
}
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]);
}
Aggregations