Class Config
Perf run configuration properties.
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Utils
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class Config
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Constructors
Config(IDictionary<string, string>)
Create config without algorithm - useful for a programmatic perf test.
Declaration
public Config(IDictionary<string, string> props)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, string> | props | Configuration properties. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Config(TextReader)
Read both algorithm and config properties.
Declaration
public Config(TextReader algReader)
Parameters
Type | Name | Description |
---|---|---|
TextReader | algReader | From where to read algorithm and config properties. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Exceptions
Type | Condition |
---|---|
IOException | If there is a low-level I/O error. |
Properties
AlgorithmText
Gets the algorithmText.
Declaration
public virtual string AlgorithmText { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
RoundNumber
Gets the round number.
Declaration
public virtual int RoundNumber { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Methods
Get(string, bool)
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 |
---|---|---|
string | name | Name of property. |
bool | dflt | Default value. |
Returns
Type | Description |
---|---|
bool | A bool property. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Get(string, double)
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.Declaration
public virtual double Get(string name, double dflt)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of property. |
double | dflt | Default value. |
Returns
Type | Description |
---|---|
double | A double property. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Get(string, int)
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.Declaration
public virtual int Get(string name, int dflt)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of property. |
int | dflt | Default value. |
Returns
Type | Description |
---|---|
int | An int property. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
Get(string, string)
Return a string property.
Declaration
public virtual string Get(string name, string dflt)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of property. |
string | dflt | Default value. |
Returns
Type | Description |
---|---|
string | A string property. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
GetColsNamesForValsByRound()
Gets names of params set by round, for reports title.
Declaration
public virtual string GetColsNamesForValsByRound()
Returns
Type | Description |
---|---|
string |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
GetColsValuesForValsByRound(int)
Gets values of params set by round, for reports lines.
Declaration
public virtual string GetColsValuesForValsByRound(int roundNum)
Parameters
Type | Name | Description |
---|---|---|
int | roundNum |
Returns
Type | Description |
---|---|
string |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
NewRound()
Increment the round number, for config values that are extracted by round number.
Declaration
public virtual int NewRound()
Returns
Type | Description |
---|---|
int | The new round number. |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".
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 |
---|---|---|
string | name | Name of property. |
string | value | Either single or multiple property value (multiple values are separated by ":") |
Remarks
Numeric property 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 environment variable "benchmark.work.dir";
- otherwise, "work".