Search in sources :

Example 11 with PipelineMetrics

use of pipelite.metrics.PipelineMetrics in project pipelite by enasequence.

the class PipelineRunnerAsyncTest method assertSubmitError.

private void assertSubmitError() {
    TestPipeline f = submitError;
    PipelineRunner pipelineRunner = pipeliteServices.runner().getPipelineRunner(f.pipelineName()).get();
    assertThat(pipelineRunner.getActiveProcessRunners().size()).isEqualTo(0);
    PipelineMetrics pipelineMetrics = metrics.pipeline(f.pipelineName());
    assertThat(pipelineMetrics.process().getInternalErrorCount()).isEqualTo(0);
    assertThat(pipelineMetrics.process().getCompletedCount()).isZero();
    assertThat(pipelineMetrics.process().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getSuccessCount()).isEqualTo(0);
    assertThat(f.stageExecutor.firstExecuteCalledCount.get()).isEqualTo(PROCESS_CNT);
    assertThat(f.stageExecutor.subsequentExecuteCalledCount.get()).isEqualTo(0);
}
Also used : ConfigurableTestPipeline(pipelite.tester.pipeline.ConfigurableTestPipeline) PipelineMetrics(pipelite.metrics.PipelineMetrics)

Example 12 with PipelineMetrics

use of pipelite.metrics.PipelineMetrics in project pipelite by enasequence.

the class PipelineRunnerAsyncTest method assertPollError.

private void assertPollError() {
    TestPipeline f = pollError;
    PipelineRunner pipelineRunner = pipeliteServices.runner().getPipelineRunner(f.pipelineName()).get();
    assertThat(pipelineRunner.getActiveProcessRunners().size()).isEqualTo(0);
    PipelineMetrics pipelineMetrics = metrics.pipeline(f.pipelineName());
    assertThat(pipelineMetrics.process().getInternalErrorCount()).isEqualTo(0);
    assertThat(pipelineMetrics.process().getCompletedCount()).isZero();
    assertThat(pipelineMetrics.process().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getSuccessCount()).isEqualTo(0);
    assertThat(f.stageExecutor.firstExecuteCalledCount.get()).isEqualTo(PROCESS_CNT);
    assertThat(f.stageExecutor.subsequentExecuteCalledCount.get()).isEqualTo(PROCESS_CNT);
}
Also used : ConfigurableTestPipeline(pipelite.tester.pipeline.ConfigurableTestPipeline) PipelineMetrics(pipelite.metrics.PipelineMetrics)

Example 13 with PipelineMetrics

use of pipelite.metrics.PipelineMetrics in project pipelite by enasequence.

the class PipelineRunnerAsyncTest method assertPollException.

private void assertPollException() {
    TestPipeline f = pollException;
    PipelineRunner pipelineRunner = pipeliteServices.runner().getPipelineRunner(f.pipelineName()).get();
    assertThat(pipelineRunner.getActiveProcessRunners().size()).isEqualTo(0);
    PipelineMetrics pipelineMetrics = metrics.pipeline(f.pipelineName());
    assertThat(pipelineMetrics.process().getInternalErrorCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.process().getCompletedCount()).isZero();
    assertThat(pipelineMetrics.process().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getFailedCount()).isEqualTo(PROCESS_CNT);
    assertThat(pipelineMetrics.stage().getSuccessCount()).isEqualTo(0);
    assertThat(f.stageExecutor.firstExecuteCalledCount.get()).isEqualTo(PROCESS_CNT);
    assertThat(f.stageExecutor.subsequentExecuteCalledCount.get()).isEqualTo(PROCESS_CNT);
}
Also used : ConfigurableTestPipeline(pipelite.tester.pipeline.ConfigurableTestPipeline) PipelineMetrics(pipelite.metrics.PipelineMetrics)

Aggregations

PipelineMetrics (pipelite.metrics.PipelineMetrics)13 ConfigurableTestPipeline (pipelite.tester.pipeline.ConfigurableTestPipeline)5 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 AtomicLong (java.util.concurrent.atomic.AtomicLong)2 Test (org.junit.jupiter.api.Test)2 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)2 Process (pipelite.process.Process)2 ZonedDateTime (java.time.ZonedDateTime)1 ArrayList (java.util.ArrayList)1 Table (tech.tablesaw.api.Table)1 Figure (tech.tablesaw.plotly.components.Figure)1