FileDocCategorySizeDatePackage
SetPropTask.javaAPI DocApache Lucene 2.2.02189Sat Jun 16 22:20:58 BST 2007org.apache.lucene.benchmark.byTask.tasks

SetPropTask

public class SetPropTask extends PerfTask
Set a performance test configuration property. A property may have a single value, or a sequence of values, seprated by ":". If a sequence of values is specified, each time a new round starts, the next (cyclic) value is taken.
Other side effects: none.
Takes mandatory param: "name,value" pair.
see
org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

Fields Summary
private String
name
private String
value
Constructors Summary
public SetPropTask(org.apache.lucene.benchmark.byTask.PerfRunData runData)

    super(runData);
  
Methods Summary
public intdoLogic()

    if (name==null || value==null) {
      throw new Exception(getName()+" - undefined name or value: name="+name+" value="+value);
    }
    getRunData().getConfig().set(name,value);
    return 0;
  
public voidsetParams(java.lang.String params)
Set the params (property name and value).

param
params property name and value separated by ','.

    super.setParams(params);
    int k = params.indexOf(",");
    name = params.substring(0,k).trim();
    value = params.substring(k+1).trim();
  
public booleansupportsParams()

    return true;