Tabnine Logo
DiagnosisDataAggregator.aggregate
Code IndexAdd Tabnine to your IDE (free)

How to use
aggregate
method
in
rocks.inspectit.server.diagnosis.service.aggregation.DiagnosisDataAggregator

Best Java code snippets using rocks.inspectit.server.diagnosis.service.aggregation.DiagnosisDataAggregator.aggregate (Showing top 8 results out of 315)

origin: inspectIT/inspectIT

/**
 * Add one InvocationSequenceData to the aggregation.
 *
 * @param invocationSequenceData
 *            invocationSequenceData to be aggregated
 */
public void aggregateInvocationSequenceData(InvocationSequenceData invocationSequenceData) {
  Object key = DIAGNOSIS_DATA_AGGREGATOR.getAggregationKey(invocationSequenceData);
  AggregatedDiagnosisData aggregatedObject = diagnosisDataAggregationMap.get(key);
  if (null != aggregatedObject) {
    DIAGNOSIS_DATA_AGGREGATOR.aggregate(aggregatedObject, invocationSequenceData);
  } else {
    aggregatedObject = DIAGNOSIS_DATA_AGGREGATOR.getAggregatedDiagnosisData(invocationSequenceData);
    diagnosisDataAggregationMap.put(key, aggregatedObject);
  }
}
origin: inspectIT/inspectIT

/**
 * Aggregate all the invocations that are considered as rootCause to the object
 * {@link RootCause}.
 *
 * @return Returns the number of candidates that are already checked.
 */
private int getRootCauses() {
  int causeCandidatesChecked = 0;
  double problemContextCommonContextDuration = InvocationSequenceDataHelper.calculateDuration(problemContext.getCommonContext());
  // Root Cause candidates are put into one Root Cause as long as the condition is true.
  while ((sumExclusiveTime < (PROPORTION * problemContextCommonContextDuration)) && (causeCandidatesChecked < causeCandidates.size())) {
    InvocationSequenceData invocation = causeCandidates.get(causeCandidatesChecked);
    if (null == rootCause) {
      rootCause = diagnosisDataAggregator.getAggregatedDiagnosisData(invocation);
    } else {
      diagnosisDataAggregator.aggregate(rootCause, invocation);
    }
    sumExclusiveTime += DiagnosisHelper.getExclusiveDuration(invocation);
    causeCandidatesChecked++;
  }
  return causeCandidatesChecked;
}
origin: inspectIT/inspectIT

double duration = DiagnosisHelper.getExclusiveDuration(invocation);
if (duration > lowerThreshold) {
  diagnosisDataAggregator.aggregate(rootCause, invocation);
} else {
  break;
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.service.aggregationDiagnosisDataAggregatoraggregate

Javadoc

Aggregate the InvocationSequenceData to the AggregatedDiagnosisData.

Popular methods of DiagnosisDataAggregator

  • getAggregatedDiagnosisData
    Convert a InvocationSequenceData to a AggregatedDiagnosisData.
  • getAggregationKey
    Get key for aggregation.
  • getInstance

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • PhpStorm for WordPress
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