org.apache.lucene.benchmark.byTask.utils
Class Config
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 an round number to return the appropriate value.
Config(File algFile) - Read config from file containing both algorithm and config properties.
|
Config(Properties props) - Create config without algorithm - usefull for a programmatic perf test.
|
Config
public Config(File algFile)
throws IOException
Read config from file containing both algorithm and config properties.
algFile
- file containing both algorithm and config properties.
Config
public Config(Properties props)
Create config without algorithm - usefull for a programmatic perf test.
props
- - configuration properties.
get
public String get(String name,
String dflt)
Return a string property.
name
- name of property.dflt
- default value.
get
public boolean get(String name,
boolean dflt)
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.
name
- name of propertydflt
- default value
get
public int get(String name,
int dflt)
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.
name
- name of propertydflt
- default value
getAlgorithmText
public String getAlgorithmText()
- Returns the algorithmText.
getColsNamesForValsByRound
public String getColsNamesForValsByRound()
- names of params set by round, for reports title
getColsValuesForValsByRound
public String getColsValuesForValsByRound(int roundNum)
- values of params set by round, for reports lines.
getRoundNumber
public int getRoundNumber()
newRound
public int newRound()
Increment the round number, for config values that are extracted by round number.
set
public void set(String name,
String value)
throws Exception
Set a property.
Note: once a multiple values property is set, it can no longer be modified.
name
- name of property.value
- either single or multiple propery value (multple values are separated by ":")
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.