congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProblemOccurrenceResultCollector
Code IndexAdd Tabnine to your IDE (free)

How to use
ProblemOccurrenceResultCollector
in
rocks.inspectit.server.diagnosis.service

Best Java code snippets using rocks.inspectit.server.diagnosis.service.ProblemOccurrenceResultCollector (Showing top 7 results out of 315)

origin: inspectIT/inspectIT

configuration.setNumSessionWorkers(numberOfSessionWorker);
configuration.addRuleClasses(ruleClasses);
configuration.setResultCollector(new ProblemOccurrenceResultCollector());
configuration.addSessionCallback(new DelegatingResultHandler());
origin: inspectIT/inspectIT

Collection<Tag> leafTags = sessionContext.getStorage().mapTags(TagState.LEAF).values();
for (Tag leafTag : leafTags) {
  Optional<InvocationSequenceData> globalContext = getGlobalContext(leafTag);
  Optional<CauseCluster> problemContext = getProblemContext(leafTag);
  Optional<AggregatedDiagnosisData> rootCauseInvocations = getRootCauseInvocations(leafTag);
  Optional<CauseStructure> causeStructure = getCauseStructure(leafTag);
origin: inspectIT/inspectIT

@Test(expectedExceptions = RuntimeException.class)
public void collectProblemInstancesWithRuntimeExceptionProblemContext() {
  CauseStructure causeStructure = new CauseStructure(CauseType.SINGLE, SourceType.TIMERDATA);
  AggregatedDiagnosisData aggregatedInvocationSequenceData = null;
  aggregatedInvocationSequenceData = DiagnosisDataAggregator.getInstance().getAggregatedDiagnosisData(secondChildSequence);
  DiagnosisDataAggregator.getInstance().aggregate(aggregatedInvocationSequenceData, secondChildSequence);
  Multimap<String, Tag> tagMap = ArrayListMultimap.create();
  Tag tagOne = new Tag(RuleConstants.DIAGNOSIS_TAG_GLOBAL_CONTEXT, secondChildSequence, Tags.rootTag(secondChildSequence));
  Tag tagTwo = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CONTEXT, "Test", tagOne);
  Tag tagThree = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CAUSE, aggregatedInvocationSequenceData, tagTwo);
  Tag tagFour = new Tag(RuleConstants.DIAGNOSIS_TAG_CAUSE_STRUCTURE, causeStructure, tagThree);
  tagMap.put("D", tagFour);
  when(sessionContext.getInput()).thenReturn(secondChildSequence);
  when(sessionContext.getStorage()).thenReturn(storage);
  when(storage.mapTags(TagState.LEAF)).thenReturn(tagMap);
  ProblemOccurrenceResultCollector problemInstanceResultCollector = new ProblemOccurrenceResultCollector();
  List<ProblemOccurrence> problemOccurrence = problemInstanceResultCollector.collect(sessionContext);
  assertThat(problemOccurrence, hasSize(0));
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = RuntimeException.class)
public void collectProblemInstancesWithRuntimeExceptionCauseStructure() {
  AggregatedDiagnosisData aggregatedInvocationSequenceData = null;
  aggregatedInvocationSequenceData = DiagnosisDataAggregator.getInstance().getAggregatedDiagnosisData(secondChildSequence);
  DiagnosisDataAggregator.getInstance().aggregate(aggregatedInvocationSequenceData, secondChildSequence);
  Multimap<String, Tag> tagMap = ArrayListMultimap.create();
  Tag tagOne = new Tag(RuleConstants.DIAGNOSIS_TAG_GLOBAL_CONTEXT, secondChildSequence, Tags.rootTag(secondChildSequence));
  Tag tagTwo = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CONTEXT, new CauseCluster(secondChildSequence), tagOne);
  Tag tagThree = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CAUSE, aggregatedInvocationSequenceData, tagTwo);
  Tag tagFour = new Tag(RuleConstants.DIAGNOSIS_TAG_CAUSE_STRUCTURE, "Test", tagThree);
  tagMap.put("D", tagFour);
  when(sessionContext.getInput()).thenReturn(secondChildSequence);
  when(sessionContext.getStorage()).thenReturn(storage);
  when(storage.mapTags(TagState.LEAF)).thenReturn(tagMap);
  ProblemOccurrenceResultCollector problemInstanceResultCollector = new ProblemOccurrenceResultCollector();
  List<ProblemOccurrence> problemOccurrence = problemInstanceResultCollector.collect(sessionContext);
  assertThat(problemOccurrence, hasSize(0));
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = RuntimeException.class)
public void collectProblemInstancesWithRuntimeExceptionGlobalContext() {
  CauseStructure causeStructure = new CauseStructure(CauseType.SINGLE, SourceType.TIMERDATA);
  AggregatedDiagnosisData aggregatedInvocationSequenceData = null;
  aggregatedInvocationSequenceData = DiagnosisDataAggregator.getInstance().getAggregatedDiagnosisData(secondChildSequence);
  DiagnosisDataAggregator.getInstance().aggregate(aggregatedInvocationSequenceData, secondChildSequence);
  Multimap<String, Tag> tagMap = ArrayListMultimap.create();
  Tag tagOne = new Tag(RuleConstants.DIAGNOSIS_TAG_GLOBAL_CONTEXT, "Test", Tags.rootTag(secondChildSequence));
  Tag tagTwo = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CONTEXT, new CauseCluster(secondChildSequence), tagOne);
  Tag tagThree = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CAUSE, aggregatedInvocationSequenceData, tagTwo);
  Tag tagFour = new Tag(RuleConstants.DIAGNOSIS_TAG_CAUSE_STRUCTURE, causeStructure, tagThree);
  tagMap.put("D", tagFour);
  when(sessionContext.getInput()).thenReturn(secondChildSequence);
  when(sessionContext.getStorage()).thenReturn(storage);
  when(storage.mapTags(TagState.LEAF)).thenReturn(tagMap);
  ProblemOccurrenceResultCollector problemInstanceResultCollector = new ProblemOccurrenceResultCollector();
  List<ProblemOccurrence> problemOccurrence = problemInstanceResultCollector.collect(sessionContext);
  assertThat(problemOccurrence, hasSize(0));
}
origin: inspectIT/inspectIT

@Test
public void collectProblemInstances() {
  CauseStructure causeStructure = new CauseStructure(CauseType.SINGLE, SourceType.TIMERDATA);
  AggregatedDiagnosisData aggregatedInvocationSequenceData = DiagnosisDataAggregator.getInstance().getAggregatedDiagnosisData(secondChildSequence);
  DiagnosisDataAggregator.getInstance().aggregate(aggregatedInvocationSequenceData, secondChildSequence);
  Multimap<String, Tag> tagMap = ArrayListMultimap.create();
  Tag tagOne = new Tag(RuleConstants.DIAGNOSIS_TAG_GLOBAL_CONTEXT, secondChildSequence, Tags.rootTag(secondChildSequence));
  Tag tagTwo = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CONTEXT, new CauseCluster(secondChildSequence), tagOne);
  Tag tagThree = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CAUSE, aggregatedInvocationSequenceData, tagTwo);
  Tag tagFour = new Tag(RuleConstants.DIAGNOSIS_TAG_CAUSE_STRUCTURE, causeStructure, tagThree);
  tagMap.put("Test", tagFour);
  when(sessionContext.getInput()).thenReturn(secondChildSequence);
  when(sessionContext.getStorage()).thenReturn(storage);
  when(storage.mapTags(TagState.LEAF)).thenReturn(tagMap);
  ProblemOccurrenceResultCollector problemInstanceResultCollector = new ProblemOccurrenceResultCollector();
  List<ProblemOccurrence> problemOccurrence = problemInstanceResultCollector.collect(sessionContext);
  assertThat(problemOccurrence, hasSize(1));
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = RuntimeException.class)
public void collectProblemInstancesWithRuntimeExceptionRootCause() {
  CauseStructure causeStructure = new CauseStructure(CauseType.SINGLE, SourceType.TIMERDATA);
  AggregatedDiagnosisData aggregatedInvocationSequenceData = null;
  aggregatedInvocationSequenceData = DiagnosisDataAggregator.getInstance().getAggregatedDiagnosisData(secondChildSequence);
  DiagnosisDataAggregator.getInstance().aggregate(aggregatedInvocationSequenceData, secondChildSequence);
  Multimap<String, Tag> tagMap = ArrayListMultimap.create();
  Tag tagOne = new Tag(RuleConstants.DIAGNOSIS_TAG_GLOBAL_CONTEXT, secondChildSequence, Tags.rootTag(secondChildSequence));
  Tag tagTwo = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CONTEXT, new CauseCluster(secondChildSequence), tagOne);
  Tag tagThree = new Tag(RuleConstants.DIAGNOSIS_TAG_PROBLEM_CAUSE, "Test", tagTwo);
  Tag tagFour = new Tag(RuleConstants.DIAGNOSIS_TAG_CAUSE_STRUCTURE, causeStructure, tagThree);
  tagMap.put("D", tagFour);
  when(sessionContext.getInput()).thenReturn(secondChildSequence);
  when(sessionContext.getStorage()).thenReturn(storage);
  when(storage.mapTags(TagState.LEAF)).thenReturn(tagMap);
  ProblemOccurrenceResultCollector problemInstanceResultCollector = new ProblemOccurrenceResultCollector();
  List<ProblemOccurrence> problemOccurrence = problemInstanceResultCollector.collect(sessionContext);
  assertThat(problemOccurrence, hasSize(0));
}
rocks.inspectit.server.diagnosis.serviceProblemOccurrenceResultCollector

Javadoc

This class collects the results of the diagnosis engine and converts the results in a List of #ProblemOccurrence. This collector expects the results of a certain structure of the rules following the logic GlobalContext, ProblemContext, RootCause, and CauseStructure. In case other Rules are used this collector must be adapted.

Most used methods

  • <init>
  • collect
    This method converts the results of the rule engine to a #ProblemOccurrence object.
  • getCauseStructure
    Returns the CauseStructure of the CauseStructure Tag.
  • getGlobalContext
    Returns the InvocationSequenceData of GlobalContext Tag.
  • getProblemContext
    Returns the InvocationSequenceData of ProblemContext Tag.
  • getRootCauseInvocations
    Returns the AggregatedInvocationSequenceData of RootCauseInvocations Tag.

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • String (java.lang)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JOptionPane (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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