public abstract class Benchmark extends Object
Constructor and Description |
---|
Benchmark() |
Modifier and Type | Method and Description |
---|---|
void |
addData(double[] d)
Adds benchmark data to the data pool.
|
void |
clearData()
Clears all collected benchmark data.
|
double[] |
createRandomDoubleArray(int size,
cern.jet.random.AbstractDistribution dist)
Creates a test set containing
size random numbers of the distribution
dist . |
long |
end()
Gets the elapsed time since the last call of
start in nanoseconds |
int |
getNumBins()
Gets the number of bins that are used for creating gnuplot histograms.
|
void |
setNumBins(int numBins)
Sets the number of bins that are used for creating gnuplot histograms.
|
void |
start()
sets a start time for the benchmark system
|
GnuPlot |
toGnuplot(GnuPlot gnuplot,
String[] dataLabels,
String[] styles)
Adds the benchmark data without conversion to a given
GnuPlot object. |
GnuPlot |
toGnuplot(String[] dataLabels,
String[] styles)
Adds the benchmark data without conversion to a new
GnuPlot object. |
GnuPlot |
toGnuPlotAsHistogram(GnuPlot gnuplot,
String[] dataLabels,
String[] styles)
Adds the benchmark data as histogram to a given
GnuPlot object. |
GnuPlot |
toGnuPlotAsHistogram(String[] dataLabels,
String[] styles)
Adds the benchmark data as histogram to a new
GnuPlot object. |
public int getNumBins()
public void setNumBins(int numBins)
numBins
- number of binspublic void addData(double[] d)
d
- benchmark datapublic void clearData()
public GnuPlot toGnuplot(String[] dataLabels, String[] styles)
GnuPlot
object.dataLabels
- labels for the benchmark datastyles
- styles for the benchmark dataGnuPlot
object containing the benchmark dataGnuPlot
public GnuPlot toGnuplot(GnuPlot gnuplot, String[] dataLabels, String[] styles)
GnuPlot
object.dataLabels
- labels for the benchmark datastyles
- styles for the benchmark dataGnuPlot
object containing the benchmark dataGnuPlot
public GnuPlot toGnuPlotAsHistogram(String[] dataLabels, String[] styles)
GnuPlot
object.dataLabels
- labels for the benchmark datastyles
- styles for the benchmark dataGnuPlot
object containing the benchmark dataGnuPlot
public GnuPlot toGnuPlotAsHistogram(GnuPlot gnuplot, String[] dataLabels, String[] styles)
GnuPlot
object.dataLabels
- labels for the benchmark datastyles
- styles for the benchmark dataGnuPlot
object containing the benchmark dataGnuPlot
public void start()
public long end()
start
in nanosecondspublic double[] createRandomDoubleArray(int size, cern.jet.random.AbstractDistribution dist)
size
random numbers of the distribution
dist
.size
- the size of the test setdist
- the probability distributionCopyright © 2007–2021. All rights reserved.