Search in sources :

Example 11 with BeforeOperationEvent

use of kieker.common.record.flow.trace.operation.BeforeOperationEvent in project iobserve-analysis by research-iobserve.

the class TestSend method main.

/**
 * Execute send test.
 *
 * @param args
 *            arguments are ignored.
 */
public static void main(final String[] args) {
    TestSend.LOGGER.debug("Sender");
    final Configuration configuration = ConfigurationFactory.createDefaultConfiguration();
    configuration.setProperty(ConfigurationKeys.CONTROLLER_NAME, "Kieker-Test");
    configuration.setProperty(ConfigurationKeys.WRITER_CLASSNAME, TestSend.WRITER_NAME);
    configuration.setProperty(SingleSocketTcpWriter.CONFIG_HOSTNAME, "localhost");
    configuration.setProperty(SingleSocketTcpWriter.CONFIG_PORT, "9876");
    configuration.setProperty(SingleSocketTcpWriter.CONFIG_BUFFERSIZE, "1024");
    configuration.setProperty(SingleSocketTcpWriter.CONFIG_FLUSH, "true");
    // add ignored values
    configuration.setProperty(ConfigurationKeys.PREFIX + "test", "true");
    configuration.setProperty(TestSend.WRITER_NAME + ".test", "true");
    TestSend.LOGGER.debug("Configuration complete");
    final IMonitoringController ctrl = MonitoringController.createInstance(configuration);
    TestSend.LOGGER.debug("Controller active");
    TestSend.LOGGER.debug("Send first record");
    IMonitoringRecord record = new TraceMetadata(1, 2, "demo", "hostname", 0, 0);
    ctrl.newMonitoringRecord(record);
    TestSend.LOGGER.debug("Send second record");
    record = new BeforeOperationEvent(0, 1, 0, "Send", "main");
    ctrl.newMonitoringRecord(record);
    TestSend.LOGGER.debug("Done");
}
Also used : IMonitoringController(kieker.monitoring.core.controller.IMonitoringController) Configuration(kieker.common.configuration.Configuration) IMonitoringRecord(kieker.common.record.IMonitoringRecord) TraceMetadata(kieker.common.record.flow.trace.TraceMetadata) BeforeOperationEvent(kieker.common.record.flow.trace.operation.BeforeOperationEvent)

Aggregations

BeforeOperationEvent (kieker.common.record.flow.trace.operation.BeforeOperationEvent)11 TraceMetadata (kieker.common.record.flow.trace.TraceMetadata)8 AfterOperationEvent (kieker.common.record.flow.trace.operation.AfterOperationEvent)8 AfterOperationFailedEvent (kieker.common.record.flow.trace.operation.AfterOperationFailedEvent)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 ArrayList (java.util.ArrayList)3 ServletException (javax.servlet.ServletException)3 HttpServletRequest (javax.servlet.http.HttpServletRequest)3 ExtendedAfterOperationEvent (org.iobserve.common.record.ExtendedAfterOperationEvent)3 GCRecord (kieker.common.record.jvm.GCRecord)2 KiekerMetadataRecord (kieker.common.record.misc.KiekerMetadataRecord)2 ContainerAllocationEvent (org.iobserve.common.record.ContainerAllocationEvent)2 ContainerDeallocationEvent (org.iobserve.common.record.ContainerDeallocationEvent)2 EJBDeployedEvent (org.iobserve.common.record.EJBDeployedEvent)2 EJBUndeployedEvent (org.iobserve.common.record.EJBUndeployedEvent)2 EntryLevelBeforeOperationEvent (org.iobserve.common.record.EntryLevelBeforeOperationEvent)2 ServerGeoLocation (org.iobserve.common.record.ServerGeoLocation)2 ServletDeployedEvent (org.iobserve.common.record.ServletDeployedEvent)2 ServletUndeployedEvent (org.iobserve.common.record.ServletUndeployedEvent)2 SessionEndEvent (org.iobserve.common.record.SessionEndEvent)2