Tabnine Logo
SensorInstrumentationPoint.getSensorIds
Code IndexAdd Tabnine to your IDE (free)

How to use
getSensorIds
method
in
rocks.inspectit.shared.all.instrumentation.config.impl.SensorInstrumentationPoint

Best Java code snippets using rocks.inspectit.shared.all.instrumentation.config.impl.SensorInstrumentationPoint.getSensorIds (Showing top 18 results out of 315)

origin: inspectIT/inspectIT

  @Test
  public void priorityReverse() {
    registeredSensorConfig.addSensorId(1, PriorityEnum.MIN);
    registeredSensorConfig.addSensorId(2, PriorityEnum.MAX);
    long[] sensorIds = registeredSensorConfig.getSensorIds();
    assertThat(sensorIds.length, is(2));
    // highest priority first
    assertThat(sensorIds[0], is(2L));
    assertThat(sensorIds[1], is(1L));
  }
}
origin: inspectIT/inspectIT

@Test
public void priority() {
  registeredSensorConfig.addSensorId(1, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MIN);
  long[] sensorIds = registeredSensorConfig.getSensorIds();
  assertThat(sensorIds.length, is(2));
  assertThat(sensorIds[0], is(1L));
  assertThat(sensorIds[1], is(2L));
}
origin: inspectIT/inspectIT

@Test
public void noDoubleId() {
  registeredSensorConfig.addSensorId(1, PriorityEnum.MIN);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(1, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MIN);
  long[] sensorIds = registeredSensorConfig.getSensorIds();
  assertThat(sensorIds.length, is(2));
}
origin: inspectIT/inspectIT

@Test
public void instrumentationExist() throws Exception {
  long agentId = 13L;
  long sensorId = 15L;
  String sensorClassName = "sensorClassName";
  MethodSensorTypeConfig methodSensorTypeConfig = mock(MethodSensorTypeConfig.class);
  when(methodSensorTypeConfig.getId()).thenReturn(sensorId);
  when(methodSensorTypeConfig.getPriority()).thenReturn(PriorityEnum.NORMAL);
  AgentConfig agentConfiguration = mock(AgentConfig.class);
  when(agentConfiguration.getPlatformId()).thenReturn(agentId);
  when(agentConfiguration.getMethodSensorTypeConfig(sensorClassName)).thenReturn(methodSensorTypeConfig);
  Map<String, Object> settings = Collections.<String, Object> singletonMap("key", "value");
  when(assignment.getSettings()).thenReturn(settings);
  IMethodSensorConfig methodSensorConfig = mock(IMethodSensorConfig.class);
  when(methodSensorConfig.getClassName()).thenReturn(sensorClassName);
  when(environment.getMethodSensorTypeConfig(Matchers.<Class<? extends IMethodSensorConfig>> any())).thenReturn(methodSensorConfig);
  SensorInstrumentationPoint rsc = mock(SensorInstrumentationPoint.class);
  when(rsc.getSensorIds()).thenReturn(new long[] { sensorId });
  MethodInstrumentationConfig instrumentationConfig = mock(MethodInstrumentationConfig.class);
  when(instrumentationConfig.getSensorInstrumentationPoint()).thenReturn(rsc);
  when(methodType.getMethodInstrumentationConfig()).thenReturn(instrumentationConfig);
  boolean changed = applier.addInstrumentationPoints(agentConfiguration, classType);
  // verify results
  assertThat(changed, is(true));
  // verify no interaction
  verifyZeroInteractions(registrationService);
  verify(instrumentationConfig, times(0)).setSensorInstrumentationPoint(Matchers.<SensorInstrumentationPoint> any());
  verify(methodType, times(0)).setMethodInstrumentationConfig(Matchers.<MethodInstrumentationConfig> any());
}
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(instrumentationConfig.getAllInstrumentationPoints(), hasSize(1));
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(1));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSettings(), is(settings));
assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(rsc.getSensorIds().length, is(2));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSensorIds()[1], is(invocationSensorId));
assertThat(rsc.isStartsInvocation(), is(true));
assertThat(rsc.isPropertyAccess(), is(true));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

SensorInstrumentationPoint rsc = instrumentationConfig.getSensorInstrumentationPoint();
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(0));
assertThat(rsc.isConstructor(), is(true));
SpecialInstrumentationPoint ssc = instrumentationConfig.getSpecialInstrumentationPoint();
origin: inspectIT/inspectIT

assertThat(instrumentationConfig.getAllInstrumentationPoints(), hasSize(1));
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(1));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSettings(), is(settings));
assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
origin: inspectIT/inspectIT

SensorInstrumentationPoint rsc = instrumentationConfig.getSensorInstrumentationPoint();
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(0));
assertThat(rsc.isConstructor(), is(false));
SpecialInstrumentationPoint ssc = instrumentationConfig.getSpecialInstrumentationPoint();
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(rsc.getSensorIds().length, is(2));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSensorIds()[1], is(invocationSensorId));
assertThat(rsc.isStartsInvocation(), is(true));
assertThat(rsc.isPropertyAccess(), is(false));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

for (long sensorId : sensorInstrumentationPoint.getSensorIds()) {
  IMethodSensor sensor = methodSensorMap.get(sensorId);
  if (null != sensor) {
origin: inspectIT/inspectIT

SensorInstrumentationPoint sensorInstrumentationPoint = config.getSensorInstrumentationPoint();
hookDispatcherMapper.addMapping(registeredSensorConfig.getId(), registeredSensorConfig);
methodToSensorMap.put(Long.valueOf(registeredSensorConfig.getId()), sensorInstrumentationPoint.getSensorIds());
rocks.inspectit.shared.all.instrumentation.config.implSensorInstrumentationPointgetSensorIds

Popular methods of SensorInstrumentationPoint

  • getId
  • getPropertyAccessorList
  • getSettings
  • isConstructor
    Gets #constructor.
  • isStartsInvocation
  • addSensorId
    Adds sensor Id if one does not exists already and properly sorts the id in the #sensorIds array base
  • containsSensorId
    If sensor if is contained in this SensorInstrumentationPoint.
  • <init>
  • addPropertyAccessor
    Adds one PropertyPathStart to the list of the property acc list.
  • addSettings
    Adds all given settings to the settings map.
  • isPropertyAccess
  • setConstructor
    Sets #constructor.
  • isPropertyAccess,
  • setConstructor,
  • setId,
  • setStartsInvocation

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Reference (javax.naming)
  • JTextField (javax.swing)
  • Top 12 Jupyter Notebook extensions
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