congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
UimaMonitor.persistCounts
Code IndexAdd Tabnine to your IDE (free)

How to use
persistCounts
method
in
uk.gov.dstl.baleen.uima.UimaMonitor

Best Java code snippets using uk.gov.dstl.baleen.uima.UimaMonitor.persistCounts (Showing top 10 results out of 315)

origin: uk.gov.dstl.baleen/baleen-uima

@Override
public void process(JCas aJCas) throws AnalysisEngineProcessException {
 monitor.trace("Starting: " + getClass().getSimpleName());
 monitor.startFunction("process");
 doProcess(aJCas);
 monitor.finishFunction("process");
 monitor.persistCounts();
 monitor.trace("Finished: " + getClass().getSimpleName());
}
origin: dstl/baleen

@Override
public void process(JCas aJCas) throws AnalysisEngineProcessException {
 monitor.trace("Starting: " + getClass().getSimpleName());
 monitor.startFunction("process");
 doProcess(aJCas);
 monitor.finishFunction("process");
 monitor.persistCounts();
 monitor.trace("Finished: " + getClass().getSimpleName());
}
origin: uk.gov.dstl.baleen/baleen-uima

@Override
public final void processStream(InputStream stream, String source, JCas jCas) throws IOException {
 monitor.startFunction("process");
 doProcessStream(stream, source, jCas);
 monitor.finishFunction("process");
 monitor.persistCounts();
}
origin: dstl/baleen

@Override
public final void processStream(InputStream stream, String source, JCas jCas) throws IOException {
 monitor.startFunction("process");
 doProcessStream(stream, source, jCas);
 monitor.finishFunction("process");
 monitor.persistCounts();
}
origin: dstl/baleen

@Override
public final void process(final JCas aJCas) throws AnalysisEngineProcessException {
 monitor.startFunction("execute");
 execute(new JobSettings(aJCas));
 monitor.finishFunction("execute");
 monitor.persistCounts();
}
origin: uk.gov.dstl.baleen/baleen-uima

@Override
public final void process(final JCas aJCas) throws AnalysisEngineProcessException {
 monitor.startFunction("execute");
 execute(new JobSettings(aJCas));
 monitor.finishFunction("execute");
 monitor.persistCounts();
}
origin: uk.gov.dstl.baleen/baleen-uima

@Override
public final void getNext(JCas jCas) throws IOException, CollectionException {
 monitor.startFunction("getNext");
 MetricsFactory.getInstance()
   .getPipelineMetrics(monitor.getPipelineName())
   .startDocumentProcess();
 doGetNext(jCas);
 monitor.finishFunction("getNext");
 monitor.persistCounts();
}
origin: dstl/baleen

@Override
public final void getNext(JCas jCas) throws IOException, CollectionException {
 monitor.startFunction("getNext");
 MetricsFactory.getInstance()
   .getPipelineMetrics(monitor.getPipelineName())
   .startDocumentProcess();
 doGetNext(jCas);
 monitor.finishFunction("getNext");
 monitor.persistCounts();
}
origin: dstl/baleen

@Test
public void testEntityRemoved() {
 UimaMonitor monitor = new UimaMonitor(PIPELINE, this.getClass());
 monitor.entityRemoved(ENTITY_TYPE_1);
 monitor.entityRemoved(ENTITY_TYPE_1);
 monitor.entityRemoved(ENTITY_TYPE_2);
 monitor.entityRemoved(ENTITY_TYPE_2);
 monitor.entityRemoved(ENTITY_TYPE_1);
 monitor.persistCounts();
 Metrics m = MetricsFactory.getMetrics(PIPELINE, this.getClass());
 assertEquals(3, m.getCounter(ENTITY_TYPE_1 + "-removed").getCount());
 assertEquals(2, m.getCounter(ENTITY_TYPE_2 + "-removed").getCount());
}
origin: dstl/baleen

@Test
public void testEntityAdded() {
 UimaMonitor monitor = new UimaMonitor(PIPELINE, this.getClass());
 monitor.entityAdded(ENTITY_TYPE_1);
 monitor.entityAdded(ENTITY_TYPE_1);
 monitor.entityAdded(ENTITY_TYPE_2);
 monitor.entityAdded(ENTITY_TYPE_2);
 monitor.entityAdded(ENTITY_TYPE_1);
 monitor.persistCounts();
 Metrics m = MetricsFactory.getMetrics(PIPELINE, this.getClass());
 assertEquals(3, m.getCounter(ENTITY_TYPE_1 + "-added").getCount());
 assertEquals(2, m.getCounter(ENTITY_TYPE_2 + "-added").getCount());
}
uk.gov.dstl.baleen.uimaUimaMonitorpersistCounts

Javadoc

Persist entity counts into the Metrics object, as we only want to do this once per process() function and not every time we add an entity.

Popular methods of UimaMonitor

  • warn
    Log a warning level message.
  • info
    Log an info level message.
  • error
    Log an error level message.
  • debug
    Log a debug level message.
  • <init>
    Constructor to create a UimaMonitor. The class and pipeline name should be specified so that we can
  • trace
    Log a trace level message.
  • counter
    Get the counter metric with the supplied name, within the scope of this monitor.
  • entityAdded
    Register that an entity of a specific type has been added
  • entityRemoved
    Register that an entity of a specific type has been removed
  • finishFunction
    Finish the timer at the end of the function, and log that the function has finished
  • getPipelineName
    Get the name of the pipeline to which this belongs.
  • meter
    Get the meter metric with the supplied name, within the scope of this monitor.
  • getPipelineName,
  • meter,
  • startFunction,
  • finishFunctionTrace,
  • histogram,
  • startFunctionTrace,
  • stopTimer,
  • timer

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • JButton (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now