Commit bc599a01 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke

#59 [Kieker 1.12 -> Kieker 1.13]

parent d7e0d81c
3.0.0
16 Oct 2017
Internal Improvement (#59)
The internal monitoring uses now Kieker 1.13.
15 Oct 2017
Internal Improvement (#58)
Added own implementations for numeric text fields.
......
......@@ -11,7 +11,6 @@ import static org.junit.Assert.assertThat;
import java.io.File;
import java.io.IOException;
import java.nio.BufferOverflowException;
import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.List;
......@@ -33,6 +32,8 @@ import kieker.common.record.flow.trace.TraceMetadata;
import kieker.common.record.flow.trace.operation.AfterOperationEvent;
import kieker.common.record.flow.trace.operation.AfterOperationFailedEvent;
import kieker.common.record.flow.trace.operation.BeforeOperationEvent;
import kieker.common.record.io.DefaultValueSerializer;
import kieker.common.record.io.IValueSerializer;
import kieker.common.record.misc.KiekerMetadataRecord;
import kieker.common.record.system.CPUUtilizationRecord;
import kieker.common.util.registry.IRegistry;
......@@ -421,6 +422,7 @@ public class MonitoringLogServiceTest {
assertThat( ivService.getTraceRoots( ).get( 0 ), is( firstMethod ) );
}
@SuppressWarnings ( "deprecation" )
private void writeRecord( final AbstractMonitoringRecord aRecord ) {
// Register the record name
final int recordKey = ivStringRegistry.get( aRecord.getClass( ).getName( ) );
......@@ -433,7 +435,7 @@ public class MonitoringLogServiceTest {
final ByteBuffer byteBuffer = ByteBuffer.wrap( byteArray );
byteBuffer.putInt( recordKey );
byteBuffer.putLong( System.currentTimeMillis( ) );
aRecord.writeBytes( byteBuffer, ivStringRegistry );
aRecord.serialize( DefaultValueSerializer.create( byteBuffer, ivStringRegistry ) );
byteBuffer.flip( );
ivByteList.add( byteArray );
......@@ -470,11 +472,16 @@ public class MonitoringLogServiceTest {
}
@Override
public void writeBytes( final ByteBuffer aBuffer, final IRegistry<String> aStringRegistry ) throws BufferOverflowException {
public void registerStrings( final IRegistry<String> aStringRegistry ) {
}
@Override
public void initFromBytes( final ByteBuffer aBuffer, final IRegistry<String> aStringRegistry ) throws BufferUnderflowException {
public void serialize( final IValueSerializer aSerializer ) throws BufferOverflowException {
}
@Override
public String[] getValueNames( ) {
return null;
}
@Override
......
......@@ -7,6 +7,6 @@ package kieker.diagnosis.architecture.monitoring;
*/
public enum Writer {
BINARY_FS, BINARY_NFS
BINARY_WRITER
}
package kieker.diagnosis.architecture.service.monitoring;
import java.util.concurrent.LinkedBlockingQueue;
import com.google.inject.Singleton;
import kieker.common.configuration.Configuration;
......@@ -12,10 +14,10 @@ import kieker.diagnosis.architecture.service.ServiceBase;
import kieker.monitoring.core.configuration.ConfigurationFactory;
import kieker.monitoring.core.controller.IMonitoringController;
import kieker.monitoring.core.controller.MonitoringController;
import kieker.monitoring.core.controller.WriterController;
import kieker.monitoring.timer.SystemMilliTimer;
import kieker.monitoring.timer.SystemNanoTimer;
import kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter;
import kieker.monitoring.writer.filesystem.AsyncBinaryNFsWriter;
import kieker.monitoring.writer.filesystem.BinaryFileWriter;
/**
* This service can be used to control the monitoring within the application (and from within the application).
......@@ -61,7 +63,7 @@ public class MonitoringService extends ServiceBase {
currentConfiguration.setOutputDirectory( System.getProperty( "java.io.tmpdir" ) );
currentConfiguration.setQueueSize( 100000 );
currentConfiguration.setTimer( Timer.NANO );
currentConfiguration.setWriter( Writer.BINARY_FS );
currentConfiguration.setWriter( Writer.BINARY_WRITER );
}
return currentConfiguration;
......@@ -105,18 +107,14 @@ public class MonitoringService extends ServiceBase {
final String queueSize = Integer.toString( aConfiguration.getQueueSize( ) );
final String bufferSize = Integer.toString( aConfiguration.getBuffer( ) );
if ( aConfiguration.getWriter( ) == Writer.BINARY_FS ) {
configuration.setProperty( ConfigurationFactory.WRITER_CLASSNAME, AsyncBinaryFsWriter.class.getName( ) );
configuration.setProperty( AsyncBinaryFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_PATH, aConfiguration.getOutputDirectory( ) );
configuration.setProperty( AsyncBinaryFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_MAXENTRIESINFILE, maxEntriesPerFile );
configuration.setProperty( AsyncBinaryFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_QUEUESIZE, queueSize );
configuration.setProperty( AsyncBinaryFsWriter.CONFIG_BUFFER, bufferSize );
} else {
configuration.setProperty( ConfigurationFactory.WRITER_CLASSNAME, AsyncBinaryNFsWriter.class.getName( ) );
configuration.setProperty( AsyncBinaryNFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_PATH, aConfiguration.getOutputDirectory( ) );
configuration.setProperty( AsyncBinaryNFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_MAXENTRIESINFILE, maxEntriesPerFile );
configuration.setProperty( AsyncBinaryNFsWriter.class.getName( ) + "." + AsyncBinaryFsWriter.CONFIG_QUEUESIZE, queueSize );
configuration.setProperty( AsyncBinaryNFsWriter.CONFIG_BUFFER, bufferSize );
if ( aConfiguration.getWriter( ) == Writer.BINARY_WRITER ) {
configuration.setProperty( ConfigurationFactory.WRITER_CLASSNAME, BinaryFileWriter.class.getName( ) );
configuration.setProperty( BinaryFileWriter.CONFIG_PATH, aConfiguration.getOutputDirectory( ) );
configuration.setProperty( BinaryFileWriter.CONFIG_MAXENTRIESINFILE, maxEntriesPerFile );
configuration.setProperty( BinaryFileWriter.CONFIG_BUFFERSIZE, bufferSize );
configuration.setProperty( WriterController.PREFIX + WriterController.RECORD_QUEUE_SIZE, queueSize );
configuration.setProperty( WriterController.PREFIX + WriterController.RECORD_QUEUE_FQN, LinkedBlockingQueue.class.getName( ) );
configuration.setProperty( BinaryFileWriter.CONFIG_FLUSH_MAPFILE, "true" );
}
// Controller
......
BINARY_FS=Binary file system writer
BINARY_NFS=Binary native file system writer
\ No newline at end of file
BINARY_WRITER=Binary Writer
\ No newline at end of file
BINARY_FS=Binrer Dateisystem Writer
BINARY_NFS=Binrer Native Dateisystem Writer
\ No newline at end of file
BINARY_WRITER=Binärer Writer
\ No newline at end of file
......@@ -10,7 +10,7 @@
<properties>
<appassembler.plugin.version>2.0.0</appassembler.plugin.version>
<kieker.version>1.12</kieker.version>
<kieker.version>1.13</kieker.version>
<guice.version>4.1.0</guice.version>
<hppc.version>0.7.2</hppc.version>
<log4j.version>2.9.1</log4j.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment