Class SampleWriter
java.lang.Object
ca.spottedleaf.sampler.SampleWriter
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final intstatic final bytestatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()int<T extends Record>
voidwriteEvent(long tid, long epochTimeMS, long nanoTime, EventRegistry.RegisteredEvent<T> event, T value) voidvoidwriteNewSampleNode(long nodeId, long stackId, long parentId) voidwriteNewStack(long id, StackTraceElement stack) voidwriteNewString(long id, String string) voidwriteNewThread(long tid, String name) voidwriteSample(long tid, long epochTimeMS, long nanoTime, long sampleNode)
-
Field Details
-
HEADER
public static final byte HEADER- See Also:
-
STREAM_END
public static final byte STREAM_END- See Also:
-
NEW_STRING
public static final byte NEW_STRING- See Also:
-
NEW_STACK
public static final byte NEW_STACK- See Also:
-
NEW_SAMPLE_NODE
public static final byte NEW_SAMPLE_NODE- See Also:
-
NEW_THREAD
public static final byte NEW_THREAD- See Also:
-
THREAD_SAMPLE
public static final byte THREAD_SAMPLE- See Also:
-
THREAD_EVENT
public static final byte THREAD_EVENT- See Also:
-
NULL_STRING_ID
public static final int NULL_STRING_ID- See Also:
-
-
Constructor Details
-
SampleWriter
- Throws:
IOException
-
-
Method Details
-
getStringCount
public int getStringCount() -
writeHeader
public void writeHeader() -
writeNewString
-
writeNewStack
-
writeNewSampleNode
public void writeNewSampleNode(long nodeId, long stackId, long parentId) -
writeNewThread
-
writeSample
public void writeSample(long tid, long epochTimeMS, long nanoTime, long sampleNode) -
writeEvent
public <T extends Record> void writeEvent(long tid, long epochTimeMS, long nanoTime, EventRegistry.RegisteredEvent<T> event, T value) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-