public class BenchmarkOption extends Object
Modifier and Type | Field and Description |
---|---|
static BenchmarkOption |
EDGES_PER_VERTEX
Option for number of edges per vertex
|
static BenchmarkOption |
HELP
Option for help
|
static BenchmarkOption |
JYTHON
Option for using Jython
|
static BenchmarkOption |
LOCAL_EDGES_MIN_RATIO
Option for minimum ratio of partition-local edges
|
static BenchmarkOption |
SCRIPT_PATH
Option for path to script for computation
|
static BenchmarkOption |
SUPERSTEPS
Option for number of supersteps
|
static BenchmarkOption |
VERBOSE
Option for verbose
|
static BenchmarkOption |
VERTICES
Option for number of vertices
|
static BenchmarkOption |
WORKERS
Option for number of workers
|
Constructor and Description |
---|
BenchmarkOption(String shortOption,
String longOption,
boolean hasArgument,
String description)
Constructor for option which is not required
|
BenchmarkOption(String shortOption,
String longOption,
boolean hasArgument,
String description,
String missingMessage)
Constructor for option which is not required
|
Modifier and Type | Method and Description |
---|---|
void |
addToOptions(org.apache.commons.cli.Options options)
Add option to cli Options
|
boolean |
checkOption(org.apache.commons.cli.CommandLine cmd,
org.apache.log4j.Logger log)
If option is not required just return true.
|
float |
getOptionFloatValue(org.apache.commons.cli.CommandLine cmd)
Retrieve the argument of this option as float value
|
float |
getOptionFloatValue(org.apache.commons.cli.CommandLine cmd,
float defaultValue)
Retrieve the argument of this option as float value,
or default value if option is not set
|
int |
getOptionIntValue(org.apache.commons.cli.CommandLine cmd)
Retrieve the argument of this option as integer value
|
int |
getOptionIntValue(org.apache.commons.cli.CommandLine cmd,
int defaultValue)
Retrieve the argument of this option as integer value,
or default value if option is not set
|
long |
getOptionLongValue(org.apache.commons.cli.CommandLine cmd)
Retrieve the argument of this option as long value
|
String |
getOptionValue(org.apache.commons.cli.CommandLine cmd)
Retrieve the argument, if any, of this option
|
boolean |
isRequired()
Check if the option is required
|
boolean |
optionTurnedOn(org.apache.commons.cli.CommandLine cmd)
Check if the option is present in CommandLine
|
public static final BenchmarkOption HELP
public static final BenchmarkOption VERBOSE
public static final BenchmarkOption WORKERS
public static final BenchmarkOption SUPERSTEPS
public static final BenchmarkOption VERTICES
public static final BenchmarkOption EDGES_PER_VERTEX
public static final BenchmarkOption LOCAL_EDGES_MIN_RATIO
public static final BenchmarkOption JYTHON
public static final BenchmarkOption SCRIPT_PATH
public BenchmarkOption(String shortOption, String longOption, boolean hasArgument, String description)
shortOption
- Short optionlongOption
- Long optionhasArgument
- True iff option requires argumentdescription
- Description of the optionpublic BenchmarkOption(String shortOption, String longOption, boolean hasArgument, String description, String missingMessage)
shortOption
- Short optionlongOption
- Long optionhasArgument
- True iff option requires argumentdescription
- Description of the optionmissingMessage
- Message to print if the option is missingpublic boolean isRequired()
public void addToOptions(org.apache.commons.cli.Options options)
options
- Cli Optionspublic boolean checkOption(org.apache.commons.cli.CommandLine cmd, org.apache.log4j.Logger log)
cmd
- CommandLinelog
- Logger to print the missing message topublic boolean optionTurnedOn(org.apache.commons.cli.CommandLine cmd)
cmd
- CommandLinepublic String getOptionValue(org.apache.commons.cli.CommandLine cmd)
cmd
- CommandLinepublic int getOptionIntValue(org.apache.commons.cli.CommandLine cmd)
cmd
- CommandLinepublic int getOptionIntValue(org.apache.commons.cli.CommandLine cmd, int defaultValue)
cmd
- CommandLinedefaultValue
- Default valuepublic long getOptionLongValue(org.apache.commons.cli.CommandLine cmd)
cmd
- CommandLinepublic float getOptionFloatValue(org.apache.commons.cli.CommandLine cmd)
cmd
- CommandLinepublic float getOptionFloatValue(org.apache.commons.cli.CommandLine cmd, float defaultValue)
cmd
- CommandLinedefaultValue
- Default valueCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.