Commit 40146210 authored by Florian Fittkau's avatar Florian Fittkau

failed records now smaller

parent 969add23
......@@ -46,7 +46,7 @@ public class MonitoringStringRegistry {
final byte[] valueAsBytes = value.getBytes();
final int regRecordLength = StringRegistryRecord.BYTE_LENGTH_WITHOUT_STRING_WITH_CLAZZ_ID
+ valueAsBytes.length;
final ByteBuffer buffer = ByteBuffer.allocateDirect(regRecordLength);
final ByteBuffer buffer = ByteBuffer.allocate(regRecordLength);
buffer.put(StringRegistryRecord.CLAZZ_ID);
buffer.putInt(result);
......@@ -62,7 +62,7 @@ public class MonitoringStringRegistry {
stringReg.entrySet());
int currentIndex = 0;
while (currentIndex < keyValues.size()) {
final ByteBuffer buffer = ByteBuffer.allocateDirect(Constants.SENDING_BUFFER_SIZE);
final ByteBuffer buffer = ByteBuffer.allocate(Constants.SENDING_BUFFER_SIZE);
while (buffer.remaining() >= (keyValues.get(currentIndex).getKey().getBytes().length + StringRegistryRecord.BYTE_LENGTH_WITHOUT_STRING_WITH_CLAZZ_ID)) {
final Entry<String, Integer> entry = keyValues.get(currentIndex);
......
package explorviz.live_trace_processing.probe;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.ByteBuffer;
import org.aspectj.lang.ProceedingJoinPoint;
......@@ -58,7 +56,7 @@ public abstract class AbstractAspect {
AfterFailedOperationEventRecord.CLAZZ_ID,
AfterOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID,
AfterOperationEventRecord.CLAZZ_ID, System.identityHashCode(thisObject), thisObject
.getClass().getName(), getInterface(thisJoinPoint));
.getClass().getName(), getInterface(thisJoinPoint));
}
@Around("monitoredOperation() && !this(java.lang.Object) && notWithinExplorViz()")
......@@ -75,7 +73,7 @@ public abstract class AbstractAspect {
AfterFailedStaticOperationEventRecord.CLAZZ_ID,
AfterStaticOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID,
AfterStaticOperationEventRecord.CLAZZ_ID, 0, thisJoinPoint.getSignature()
.getDeclaringTypeName(), getInterface(thisJoinPoint));
.getDeclaringTypeName(), getInterface(thisJoinPoint));
}
@Around("monitoredConstructor() && this(thisObject) && notWithinExplorViz()")
......@@ -120,7 +118,7 @@ public abstract class AbstractAspect {
final int beforeLength, final byte beforeId, final int afterFailedLength,
final byte afterFailedId, final int afterLength, final byte afterId,
final int objectId, final String clazz, final String implementedInterface)
throws Throwable {
throws Throwable {
final ByteBuffer buffer = bufferStore.get();
final ProbeTraceMetaData trace = TraceRegistry.getTrace();
......@@ -157,11 +155,10 @@ public abstract class AbstractAspect {
buffer.putLong(trace.getTraceId());
buffer.putInt(trace.getNextOrderId());
final StringWriter errors = new StringWriter();
th.printStackTrace(new PrintWriter(errors));
// final StringWriter errors = new StringWriter();
// th.printStackTrace(new PrintWriter(errors));
final int errorId = MonitoringStringRegistry.getIdForString(errors.toString());
buffer.putInt(errorId);
buffer.putInt(MonitoringStringRegistry.getIdForString(th.getLocalizedMessage()));
trace.decreaseStackDepthAndEndTraceIfNeccessary();
......
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