Codota Logo
AgentStatisticsLogger.dataDropped
Code IndexAdd Codota to your IDE (free)

How to use
dataDropped
method
in
rocks.inspectit.agent.java.stats.AgentStatisticsLogger

Best Java code snippets using rocks.inspectit.agent.java.stats.AgentStatisticsLogger.dataDropped (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = IllegalArgumentException.class)
public void zeroCount() {
  statsLogger.dataDropped(0);
}
origin: inspectIT/inspectIT

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void negativeCount() {
    statsLogger.dataDropped(-10);
  }
}
origin: inspectIT/inspectIT

@Test
public void onFirstAndTenthAndHundredAndThousand() {
  statsLogger.dataDropped(1);
  statsLogger.dataDropped(9);
  statsLogger.dataDropped(90);
  statsLogger.dataDropped(900);
  verify(log, times(4)).warn(anyString());
}
origin: inspectIT/inspectIT

@Test
public void everyThousand() {
  statsLogger.dataDropped(2999);
  statsLogger.dataDropped(1);
  statsLogger.dataDropped(1);
  verify(log, times(2)).warn(anyString());
}
origin: inspectIT/inspectIT

@Test
public void onFirstAndTenthAndHundred() {
  statsLogger.dataDropped(1);
  statsLogger.dataDropped(9);
  statsLogger.dataDropped(90);
  verify(log, times(3)).warn(anyString());
}
origin: inspectIT/inspectIT

@Test
public void onSecondNot() {
  statsLogger.dataDropped(1);
  statsLogger.dataDropped(1);
  verify(log, times(1)).warn(anyString());
}
origin: inspectIT/inspectIT

@Test
public void onFirstAndTenth() {
  statsLogger.dataDropped(1);
  statsLogger.dataDropped(9);
  verify(log, times(2)).warn(anyString());
}
origin: inspectIT/inspectIT

@Test
public void onFirst() {
  statsLogger.dataDropped(1);
  verify(log, times(1)).warn(anyString());
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void onEvent(DefaultDataWrapper defaultDataWrapper, long sequence, boolean endOfBatch) {
  defaultDatas.add(defaultDataWrapper.getDefaultData());
  if (endOfBatch) {
    try {
      if (connection.isConnected()) {
        connection.sendDataObjects(defaultDatas);
        sendingExceptionNotice = false;
      } else {
        statsLogger.dataDropped(defaultDatas.size());
      }
    } catch (ServerUnavailableException serverUnavailableException) {
      if (serverUnavailableException.isServerTimeout()) {
        log.warn("Timeout on server when sending actual data. Data might be lost!", serverUnavailableException);
      } else {
        if (!sendingExceptionNotice) {
          sendingExceptionNotice = true;
          log.error("Connection problem appeared, stopping sending actual data!", serverUnavailableException);
        }
      }
    } finally {
      defaultDatas.clear();
    }
  }
}
origin: inspectIT/inspectIT

@Test
public void notConnected() throws ServerUnavailableException {
  when(wrapper.getDefaultData()).thenReturn(defaultData);
  when(connection.isConnected()).thenReturn(false);
  handler.onEvent(wrapper, 0L, true);
  verify(statsLogger).dataDropped(1);
  verify(connection).isConnected();
  verifyNoMoreInteractions(connection, statsLogger);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void addDefaultData(DefaultData defaultData) {
  // ignore any data adding if we are in the shutdown phase
  if (shutdown) {
    return;
  }
  try {
    // grab the next sequence, never wait for it to be available so that that we don't block
    long sequence = ringBuffer.tryNext();
    try {
      // get the entry in the disruptor for the sequence and simply change the reference
      DefaultDataWrapper defaultDataWrapper = ringBuffer.get(sequence);
      defaultDataWrapper.setDefaultData(defaultData);
    } finally {
      ringBuffer.publish(sequence);
    }
  } catch (InsufficientCapacityException e) {
    // pass the dropped count
    statsLogger.dataDropped(1);
  }
}
origin: inspectIT/inspectIT

@Test
public void capacityReached() throws InterruptedException, StorageException {
  when(disruptorStrategy.getDataBufferSize()).thenReturn(2);
  // slow down the wrapper so we get capacity error
  doAnswer(new Answer<Void>() {
    @Override
    public Void answer(InvocationOnMock invocation) throws Throwable {
      Thread.sleep(1);
      return null;
    }
  }).when(defaultDataHandler).onEvent(Mockito.<DefaultDataWrapper> any(), anyLong(), anyBoolean());
  coreService.start();
  coreService.addDefaultData(data);
  coreService.addDefaultData(data);
  coreService.addDefaultData(data);
  coreService.addDefaultData(data);
  // we should report 2 times
  verify(statsLogger, times(2)).dataDropped(1);
}
rocks.inspectit.agent.java.statsAgentStatisticsLoggerdataDropped

Javadoc

Signals data drop.

Popular methods of AgentStatisticsLogger

  • noClassCacheAvailable
    Signals throws businessTransaction caused by missing class cache.

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now