Class Config
Perf run configuration properties.
Inheritance
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Utils
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class Config
  Remarks
Numeric property containing ":", e.g. "10💯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 environment variable "benchmark.work.dir";
 - otherwise, "work".
 
Constructors
| Improve this Doc View SourceConfig(IDictionary<String, String>)
Create config without algorithm - useful for a programmatic perf test.
Declaration
public Config(IDictionary<string, string> props)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.IDictionary<System.String, System.String> | props | Configuration properties.  | 
      
Config(TextReader)
Read both algorithm and config properties.
Declaration
public Config(TextReader algReader)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.TextReader | algReader | From where to read algorithm and config properties.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.IO.IOException | If there is a low-level I/O error.  | 
      
Properties
| Improve this Doc View SourceAlgorithmText
Gets the algorithmText.
Declaration
public virtual string AlgorithmText { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
RoundNumber
Gets the round number.
Declaration
public virtual int RoundNumber { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Methods
| Improve this Doc View SourceGet(String, Boolean)
Return a boolean property. If the property contain ":", e.g. "true.true.false", it is interpreted as array of booleans. It is extracted once, on first call to Get() it, and a by-round-value is returned.
Declaration
public virtual bool Get(string name, bool dflt)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name of property.  | 
      
| System.Boolean | dflt | Default value.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | A System.Boolean property.  | 
      
Get(String, Double)
Return a double property.
If the property contain ":", e.g. "10💯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.
Declaration
public virtual double Get(string name, double dflt)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name of property.  | 
      
| System.Double | dflt | Default value.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Double | A double property.  | 
      
Get(String, Int32)
Return an System.Int32 property.
If the property contain ":", e.g. "10💯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.
Declaration
public virtual int Get(string name, int dflt)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name of property.  | 
      
| System.Int32 | dflt | Default value.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | An System.Int32 property.  | 
      
Get(String, String)
Return a string property.
Declaration
public virtual string Get(string name, string dflt)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name of property.  | 
      
| System.String | dflt | Default value.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | A string property.  | 
      
GetColsNamesForValsByRound()
Gets names of params set by round, for reports title.
Declaration
public virtual string GetColsNamesForValsByRound()
  Returns
| Type | Description | 
|---|---|
| System.String | 
GetColsValuesForValsByRound(Int32)
Gets values of params set by round, for reports lines.
Declaration
public virtual string GetColsValuesForValsByRound(int roundNum)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | roundNum | 
Returns
| Type | Description | 
|---|---|
| System.String | 
NewRound()
Increment the round number, for config values that are extracted by round number.
Declaration
public virtual int NewRound()
  Returns
| Type | Description | 
|---|---|
| System.Int32 | The new round number.  | 
      
Set(String, String)
Set a property.
Note: once a multiple values property is set, it can no longer be modified.
Declaration
public virtual void Set(string name, string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name of property.  | 
      
| System.String | value | Either single or multiple property value (multiple values are separated by ":")  |