Search in sources :

Example 6 with StressMasterBench

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

the class StressMasterBenchIntegrationTest method createFileAndDelete.

@Test
public void createFileAndDelete() throws Exception {
    // Only in-process will work for unit testing.
    String output = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "CreateFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    generateAndVerifyReport(Collections.singletonList("CreateFile"), output);
    // run again to test the deletion of the test directory
    output = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "CreateFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "2", "--warmup", "0s", "--duration", "1s" });
    String output2 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "GetBlockLocations", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output3 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "OpenFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output4 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "DeleteFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    generateAndVerifyReport(Arrays.asList("CreateFile", "GetBlockLocations", "OpenFile", "DeleteFile"), output, output2, output3, output4);
}
Also used : StressMasterBench(alluxio.stress.cli.StressMasterBench) Test(org.junit.Test)

Example 7 with StressMasterBench

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

the class StressMasterBenchIntegrationTest method createFileAndListAndRename.

@Test
public void createFileAndListAndRename() throws Exception {
    // Only in-process will work for unit testing.
    String output1 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "CreateFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output2 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "GetFileStatus", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output3 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "ListDir", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output4 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "ListDirLocated", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    String output5 = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "RenameFile", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    generateAndVerifyReport(Arrays.asList("CreateFile", "GetFileStatus", "ListDir", "ListDirLocated", "RenameFile"), output1, output2, output3, output4, output5);
}
Also used : StressMasterBench(alluxio.stress.cli.StressMasterBench) Test(org.junit.Test)

Example 8 with StressMasterBench

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

the class StressMasterBenchIntegrationTest method createDir.

@Test
public void createDir() throws Exception {
    // Only in-process will work for unit testing.
    String output = new StressMasterBench().run(new String[] { "--in-process", "--base", sLocalAlluxioClusterResource.get().getMasterURI() + "/", "--operation", "CreateDir", "--fixed-count", "20", "--target-throughput", "100", "--threads", "5", "--warmup", "0s", "--duration", "1s" });
    generateAndVerifyReport(Collections.singletonList("CreateDir"), output);
}
Also used : StressMasterBench(alluxio.stress.cli.StressMasterBench) Test(org.junit.Test)

Aggregations

StressMasterBench (alluxio.stress.cli.StressMasterBench)8 MasterBenchSummary (alluxio.stress.master.MasterBenchSummary)4 Test (org.junit.Test)4 Benchmark (alluxio.stress.cli.Benchmark)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 ArrayList (java.util.ArrayList)1