Skip to content
Snippets Groups Projects
Commit 1725d18b authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Added benchmark method.

parent af5014a6
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,10 @@ public class DataCompressor {
}
return;
}
case Benchmark: {
System.out.println("Call benchmark with parsed options.");
}
break;
case PrintHelp: {
formatter.printHelp(CliConstants.MAIN_HELP, options);
}
......@@ -90,6 +94,12 @@ public class DataCompressor {
CliConstants.INSPECT_LONG,
false,
"Inspect the compressed file"));
methodGroup.addOption(new Option(CliConstants.BENCHMARK_SHORT,
CliConstants.BENCHMARK_LONG,
false,
"Benchmark"));
methodGroup.addOption(new Option(CliConstants.HELP_SHORT, CliConstants.HELP_LONG, false, "Print help"));
OptionGroup compressionMethodGroup = new OptionGroup();
......
......@@ -13,6 +13,9 @@ public class CliConstants {
public static final String DECOMPRESS_SHORT = "d";
public static final String DECOMPRESS_LONG = "decompress";
public static final String BENCHMARK_SHORT = "bench";
public static final String BENCHMARK_LONG = "benchmark";
public static final String INSPECT_SHORT = "i";
public static final String INSPECT_LONG = "inspect";
......
......@@ -80,7 +80,6 @@ public class ParsedCliOptions {
parseBitsPerPixel(cmd, errorBuilder);
parseReferencePlaneIndex(cmd, errorBuilder);
final String[] fileInfo = cmd.getArgs();
......@@ -285,6 +284,8 @@ public class ParsedCliOptions {
method = ProgramMethod.Compress;
} else if (cmd.hasOption(CliConstants.DECOMPRESS_LONG)) {
method = ProgramMethod.Decompress;
} else if (cmd.hasOption(CliConstants.BENCHMARK_LONG)) {
method = ProgramMethod.Benchmark;
} else if (cmd.hasOption(CliConstants.INSPECT_LONG)) {
method = ProgramMethod.InspectFile;
} else {
......
......@@ -3,5 +3,7 @@ package azgracompress.cli;
public enum ProgramMethod {
Compress,
Decompress,
PrintHelp, InspectFile
Benchmark,
PrintHelp,
InspectFile
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment