Class ContentItemsSource
Base class for source of data for benchmarking.
Inheritance
Assembly: Lucene.Net.Benchmark.dll
Syntax
public abstract class ContentItemsSource : IDisposable
Remarks
Keeps track of various statistics, such as how many data items were generated, size in bytes etc.
Supports the following configuration parameters:
- content.source.foreverspecifies whether to generate items forever (default=true).
- content.source.verbosespecifies whether messages should be output by the content source (default=false).
- content.source.encoding specifies which encoding to use when reading the files of that content source. Certain implementations may define a default value if this parameter is not specified. (default=null).
- content.source.log.step specifies for how many items a message should be logged. If set to 0 it means no logging should occur. NOTE: if verbose is set to false, logging should not occur even if logStep is not 0 (default=0).
Fields
Name | Description |
---|---|
m_encoding | |
m_forever | |
m_logStep | |
m_verbose |
Properties
Name | Description |
---|---|
BytesCount | Returns the number of bytes generated since last reset. |
Config | |
ItemsCount | Returns the number of generated items since last reset. |
TotalBytesCount | Returns the total number of bytes that were generated by this source. |
TotalItemsCount | Returns the total number of generated items. |
Methods
Name | Description |
---|---|
AddBytes(Int64) | update count of bytes generated by this source |
AddItem() | update count of items generated by this source |
CollectFiles(DirectoryInfo, IList<FileInfo>) | A convenience method for collecting all the files of a content source from
a given directory. The collected |
Dispose() | Called when reading from this content source is no longer required. |
Dispose(Boolean) | Called when reading from this content source is no longer required. |
PrintStatistics(String) | |
ResetInputs() | Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
NOTE: the default implementation resets the number of bytes and
items generated since the last reset, so it's important to call
|
SetConfig(Config) | Sets the Config for this content source. If you override this
method, you must call |
ShouldLog() | Returns |