public final class PerformanceTestUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
initRandomCas(org.apache.uima.jcas.JCas aJCas,
int aTextSize,
int aAnnotationCount,
long aSeed)
Initializes a CAS with random text, tokens, and sentences.
|
static org.apache.commons.math3.stat.descriptive.SummaryStatistics |
measureReadPerformance(org.apache.uima.collection.CollectionReaderDescription aReaderDesc,
org.apache.uima.jcas.JCas aJCas,
int aIterations) |
static org.apache.commons.math3.stat.descriptive.SummaryStatistics |
measureWritePerformance(org.apache.uima.analysis_engine.AnalysisEngineDescription aWriterDesc,
Iterable<org.apache.uima.jcas.JCas> aTestData) |
static <T> Iterable<T> |
repeat(T aObject,
int aCount) |
public static org.apache.commons.math3.stat.descriptive.SummaryStatistics measureWritePerformance(org.apache.uima.analysis_engine.AnalysisEngineDescription aWriterDesc, Iterable<org.apache.uima.jcas.JCas> aTestData) throws org.apache.uima.resource.ResourceInitializationException, org.apache.uima.analysis_engine.AnalysisEngineProcessException
org.apache.uima.resource.ResourceInitializationException
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public static org.apache.commons.math3.stat.descriptive.SummaryStatistics measureReadPerformance(org.apache.uima.collection.CollectionReaderDescription aReaderDesc, org.apache.uima.jcas.JCas aJCas, int aIterations) throws org.apache.uima.resource.ResourceInitializationException, org.apache.uima.collection.CollectionException, IOException, org.apache.uima.resource.ResourceConfigurationException
org.apache.uima.resource.ResourceInitializationException
org.apache.uima.collection.CollectionException
IOException
org.apache.uima.resource.ResourceConfigurationException
public static void initRandomCas(org.apache.uima.jcas.JCas aJCas, int aTextSize, int aAnnotationCount, long aSeed)
aJCas
- the CASaTextSize
- the length of the text to be generated.aAnnotationCount
- the number of annotations to be generated.aSeed
- the random seed to allow for repeatable randomness.public static <T> Iterable<T> repeat(T aObject, int aCount)
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.