Package org.aksw.palmetto.evaluate
Class SpeedComparison
- java.lang.Object
-
- org.aksw.palmetto.evaluate.SpeedComparison
-
public class SpeedComparison extends Object
This class implements the runtime comparison of complete coherence calculations as well as single parts of a coherence.- Author:
- Michael Röder (michael.roeder@uni-paderborn.de)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpeedComparison.AbstractTimeMeasuringModuleMeasures in nano seconds!static classSpeedComparison.TimeMeasuringAggregationstatic classSpeedComparison.TimeMeasuringConfirmationstatic classSpeedComparison.TimeMeasuringProbabilitySupplier
-
Field Summary
Fields Modifier and Type Field Description private intnumberOfRunsprivate intnumberOfWarmupsprivate Randomrandom
-
Constructor Summary
Constructors Constructor Description SpeedComparison(long seed, int numberOfWarmups, int numberOfRuns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longexecuteCoherenceCalculation(Coherence coherence, String[][] wordSets)protected voidexecuteCoherenceCalculations(Coherence[] coherences, String[][] wordSets, Map<String,long[]> times, int runId)protected int[]getRandomOrder(int n)static voidmain(String[] args)protected static voidprintStatistics(String label, long[] values)voidrun(Coherence[] coherences, List<SpeedComparison.AbstractTimeMeasuringModule> modules, String[][] wordSets)
-
-
-
Field Detail
-
random
private Random random
-
numberOfWarmups
private final int numberOfWarmups
-
numberOfRuns
private final int numberOfRuns
-
-
Method Detail
-
run
public void run(Coherence[] coherences, List<SpeedComparison.AbstractTimeMeasuringModule> modules, String[][] wordSets)
-
executeCoherenceCalculations
protected void executeCoherenceCalculations(Coherence[] coherences, String[][] wordSets, Map<String,long[]> times, int runId)
-
executeCoherenceCalculation
protected long executeCoherenceCalculation(Coherence coherence, String[][] wordSets)
-
getRandomOrder
protected int[] getRandomOrder(int n)
-
printStatistics
protected static void printStatistics(String label, long[] values)
-
main
public static void main(String[] args) throws org.apache.lucene.index.CorruptIndexException, IOException
- Throws:
org.apache.lucene.index.CorruptIndexExceptionIOException
-
-