| java.lang.Object org.apache.lucene.benchmark.byTask.utils.Config
Config | public class Config (Code) | | Perf run configuration properties.
Numeric peroperty containing ":", e.g. "10:100:5" is interpreted
as array of numeric values. It is extracted once, on first use, and
maintain a round number to return the appropriate value.
The config property "work.dir" tells where is the root of
docs data dirs and indexes dirs. It is set to either of:
- value supplied for it in the alg file;
- otherwise, value of System property "benchmark.work.dir";
- otherwise, "work".
|
Constructor Summary | |
public | Config(Reader algReader) Read both algorithm and config properties. | public | Config(Properties props) Create config without algorithm - usefull for a programmatic perf test. |
Config | public Config(Reader algReader) throws IOException(Code) | | Read both algorithm and config properties.
Parameters: algReader - from where to read algorithm and config properties. throws: IOException - |
Config | public Config(Properties props)(Code) | | Create config without algorithm - usefull for a programmatic perf test.
Parameters: props - - configuration properties. throws: IOException - |
get | public String get(String name, String dflt)(Code) | | Return a string property.
Parameters: name - name of property. Parameters: dflt - default value. a string property. |
get | public int get(String name, int dflt)(Code) | | Return an int property.
If the property contain ":", e.g. "10:100:5", it is interpreted
as array of ints. It is extracted once, on first call
to get() it, and a by-round-value is returned.
Parameters: name - name of property Parameters: dflt - default value a int property. |
get | public double get(String name, double dflt)(Code) | | Return a double property.
If the property contain ":", e.g. "10:100:5", it is interpreted
as array of doubles. It is extracted once, on first call
to get() it, and a by-round-value is returned.
Parameters: name - name of property Parameters: dflt - default value a double property. |
get | public boolean get(String name, boolean dflt)(Code) | | Return a boolean property.
If the property contain ":", e.g. "true.true.false", it is interpreted
as array of boleans. It is extracted once, on first call
to get() it, and a by-round-value is returned.
Parameters: name - name of property Parameters: dflt - default value a int property. |
getAlgorithmText | public String getAlgorithmText()(Code) | | Returns the algorithmText. |
getColsNamesForValsByRound | public String getColsNamesForValsByRound()(Code) | | names of params set by round, for reports title |
getColsValuesForValsByRound | public String getColsValuesForValsByRound(int roundNum)(Code) | | values of params set by round, for reports lines. |
getRoundNumber | public int getRoundNumber()(Code) | | the round number. |
newRound | public int newRound()(Code) | | Increment the round number, for config values that are extracted by round number.
the new round number. |
set | public void set(String name, String value) throws Exception(Code) | | Set a property.
Note: once a multiple values property is set, it can no longer be modified.
Parameters: name - name of property. Parameters: value - either single or multiple propery value (multple values are separated by ":") throws: Exception - |
|
|