Class PerfRunData
java.lang.Object
org.apache.lucene.benchmark.byTask.PerfRunData
- All Implemented Interfaces:
Closeable
,AutoCloseable
Data maintained by a performance test run.
Data includes:
- Configuration.
- Directory, Writer, Reader.
- Taxonomy Directory, Writer, Reader.
- DocMaker, FacetSource and a few instances of QueryMaker.
- Named AnalysisFactories.
- Analyzer.
- Statistics data which updated during the run.
- work.dir=<path to root of docs and index dirs| Default: work>
- analyzer=<class name for analyzer| Default: StandardAnalyzer>
- doc.maker=<class name for doc-maker| Default: DocMaker>
- facet.source=<class name for facet-source| Default: RandomFacetSource>
- query.maker=<class name for query-maker| Default: SimpleQueryMaker>
- log.queries=<whether queries should be printed| Default: false>
- directory=<type of directory to use for the index| Default: ByteBuffersDirectory>
- taxonomy.directory=<type of directory for taxonomy index| Default: ByteBuffersDirectory>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Returns the ContentSource.Returns the DocMaker.Returns the facet source.getPerfObject
(String key) Returns an object that was previously set bysetPerfObject(String, Object)
.getQueryMaker
(ReadTask readTask) long
void
reinit
(boolean eraseIndex) void
void
setAnalyzer
(Analyzer analyzer) void
setDirectory
(Directory directory) void
setIndexReader
(DirectoryReader indexReader) Set the index reader.void
setIndexWriter
(IndexWriter indexWriter) void
void
setPerfObject
(String key, Object obj) Sets an object that is required byPerfTask
s, keyed by the givenkey
.long
void
setTaxonomyReader
(TaxonomyReader taxoReader) Set the taxonomy reader.void
setTaxonomyWriter
(TaxonomyWriter taxoWriter)
-
Constructor Details
-
PerfRunData
- Throws:
Exception
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
reinit
- Throws:
Exception
-
getPerfObject
Returns an object that was previously set bysetPerfObject(String, Object)
. -
setPerfObject
-
setStartTimeMillis
public long setStartTimeMillis() -
getStartTimeMillis
public long getStartTimeMillis()- Returns:
- Start time in milliseconds
-
getPoints
- Returns:
- Returns the points.
-
getDirectory
- Returns:
- Returns the directory.
-
setDirectory
- Parameters:
directory
- The directory to set.
-
getTaxonomyDir
- Returns:
- Returns the taxonomy directory
-
setTaxonomyReader
Set the taxonomy reader. Takes ownership of that taxonomy reader, that is, internally performs taxoReader.incRef() (If caller no longer needs that reader it should decRef()/close() it after calling this method, otherwise, the reader will remain open).- Parameters:
taxoReader
- The taxonomy reader to set.- Throws:
IOException
-
getTaxonomyReader
- Returns:
- Returns the taxonomyReader. NOTE: this returns a reference. You must call TaxonomyReader.decRef() when you're done.
-
setTaxonomyWriter
- Parameters:
taxoWriter
- The taxonomy writer to set.
-
getTaxonomyWriter
-
getIndexReader
- Returns:
- Returns the indexReader. NOTE: this returns a reference. You must call IndexReader.decRef() when you're done.
-
getIndexSearcher
- Returns:
- Returns the indexSearcher. NOTE: this returns a reference to the underlying IndexReader. You must call IndexReader.decRef() when you're done.
-
setIndexReader
Set the index reader. Takes ownership of that index reader, that is, internally performs indexReader.incRef() (If caller no longer needs that reader it should decRef()/close() it after calling this method, otherwise, the reader will remain open).- Parameters:
indexReader
- The indexReader to set.- Throws:
IOException
-
getIndexWriter
- Returns:
- Returns the indexWriter.
-
setIndexWriter
- Parameters:
indexWriter
- The indexWriter to set.
-
getAnalyzer
- Returns:
- Returns the analyzer.
-
setAnalyzer
-
getContentSource
Returns the ContentSource. -
getDocMaker
Returns the DocMaker. -
getFacetSource
Returns the facet source. -
getLocale
- Returns:
- the locale
-
setLocale
- Parameters:
locale
- the locale to set
-
getConfig
- Returns:
- Returns the config.
-
resetInputs
- Throws:
IOException
-
getQueryMaker
- Returns:
- Returns the queryMaker by read task type (class)
-
getAnalyzerFactories
-