## org.apache.lucene.benchmark.stats
Class TestData

    java.lang.Object
      org.apache.lucene.benchmark.stats.TestData

    public class TestData

extends Object

This class holds together all parameters related to a test. Single test is performed several times, and all results are averaged.

Author:
  Andrzej Bialecki <ab@getopt.org>

Field Summary
`static int[]` `MAX_BUFFERED_DOCS_COUNTS`
`static int[]` `MERGEFACTOR_COUNTS`

Constructor Summary
`TestData()`

Method Summary
`protected Object` `clone()`
`static TestData[]` `getAll(File[] sources, Analyzer[] analyzers)` Prepare a list of benchmark data, using all possible combinations of benchmark parameters.
`Analyzer` `getAnalyzer()`
`Directory` `getDirectory()`
`long` `getHeap()`
`String` `getId()`
`int` `getMaxBufferedDocs()`
`int` `getMergeFactor()`
`QueryData[]` `getQueries()`
`Vector` `getRunData()`
`File` `getSource()`
`static TestData[]` `getTestDataMinMaxMergeAndMaxBuffered(File[] sources, Analyzer[] analyzers)` Similar to `getAll(java.io.File[], org.apache.lucene.analysis.Analyzer[])` but only uses maxBufferedDocs of 10 and 100 and same for mergeFactor, thus reducing the number of permutations significantly.
`boolean` `isCompound()`
`boolean` `isOptimize()`
`void` `setAnalyzer(Analyzer analyzer)`
`void` `setCompound(boolean compound)`
`void` `setDirectory(Directory directory)`
`void` `setHeap(long heap)`
`void` `setId(String id)`
`void` `setMaxBufferedDocs(int maxBufferedDocs)`
`void` `setMergeFactor(int mergeFactor)`
`void` `setOptimize(boolean optimize)`
`void` `setQueries(QueryData[] queries)`
`void` `setRunData(Vector runData)`
`void` `setSource(File source)`
`String` `showRunData(String prefix)`
`String` `toString()`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### MAX_BUFFERED_DOCS_COUNTS

    public static int[] MAX_BUFFERED_DOCS_COUNTS

### MERGEFACTOR_COUNTS

    public static int[] MERGEFACTOR_COUNTS

Constructor Detail

### TestData

    public TestData()

Method Detail

### showRunData

    public String showRunData(String prefix)

### getAll

    public static TestData[] getAll(File[] sources,
                                    Analyzer[] analyzers)

  Prepare a list of benchmark data, using all possible combinations of benchmark parameters.

  Parameters:
    `sources` - list of directories containing different source document collections
    `analyzers` - of analyzers to use.

### getTestDataMinMaxMergeAndMaxBuffered

    public static TestData[] getTestDataMinMaxMergeAndMaxBuffered(File[] sources,
                                                                  Analyzer[] analyzers)

  Similar to `getAll(java.io.File[], org.apache.lucene.analysis.Analyzer[])` but only uses maxBufferedDocs of 10 and 100 and same for mergeFactor, thus reducing the number of permutations significantly. It also only uses compund file and optimize is always true.

  Parameters:
    `sources` -
    `analyzers` -
  Returns:
    An Array of `TestData`

### clone

    protected Object clone()

  Overrides:
    `clone` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getAnalyzer

    public Analyzer getAnalyzer()

### setAnalyzer

    public void setAnalyzer(Analyzer analyzer)

### isCompound

    public boolean isCompound()

### setCompound

    public void setCompound(boolean compound)

### getDirectory

    public Directory getDirectory()

### setDirectory

    public void setDirectory(Directory directory)

### getHeap

    public long getHeap()

### setHeap

    public void setHeap(long heap)

### getId

    public String getId()

### setId

    public void setId(String id)

### getMaxBufferedDocs

    public int getMaxBufferedDocs()

### setMaxBufferedDocs

    public void setMaxBufferedDocs(int maxBufferedDocs)

### getMergeFactor

    public int getMergeFactor()

### setMergeFactor

    public void setMergeFactor(int mergeFactor)

### isOptimize

    public boolean isOptimize()

### setOptimize

    public void setOptimize(boolean optimize)

### getQueries

    public QueryData[] getQueries()

### setQueries

    public void setQueries(QueryData[] queries)

### getRunData

    public Vector getRunData()

### setRunData

    public void setRunData(Vector runData)

### getSource

    public File getSource()

### setSource

    public void setSource(File source)

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.