public abstract class ProbeMetaData
extends java.lang.Object
Probe.getMetaData()
. In that method, you create an instance with
create(String)
and call its methods to configure the probe. The meta data provides a fluent interface, so
you can append method calls like in ProbeMetaData.create("Test").events(true).recordOnStartup(false)
.
The help topic on custom probes in the bundled documentation explains how to develop custom probes.
Constructor and Description |
---|
ProbeMetaData() |
Modifier and Type | Method and Description |
---|---|
abstract ProbeMetaData |
addAdditionalControlObjectData(java.lang.String name,
DataType dataType,
boolean nested)
Configures an additional data column for control objects.
|
abstract ProbeMetaData |
addAdditionalData(java.lang.String name,
DataType dataType)
Configures an additional data column for probe events.
|
abstract ProbeMetaData |
addCustomTelemetry(java.lang.String name,
Unit unit,
float factor)
Configures a custom telemetry.
|
abstract ProbeMetaData |
addOpenControlObjectTelemetry(java.lang.String name)
Configures a telemetry that shows the number of open control objects.
|
abstract ProbeMetaData |
annotatePayloads(boolean annotatePayloads)
Configures if the probe should annotate data into the call tree view.
|
abstract ProbeMetaData |
closeTypeName(java.lang.String name)
Sets the name of the automatic event type for the closing of a control object.
|
abstract ProbeMetaData |
controlObjectView(boolean controlObjectView)
Configures if the probe publishes control objects.
|
static ProbeMetaData |
create(java.lang.String name)
Creates an meta-data instance.
|
abstract ProbeMetaData |
customColors(int... customColors)
Configures the colors of the custom events in the time line view.
|
abstract ProbeMetaData |
customTypeNames(java.lang.String... typeNames)
Configures the custom event types and their names.
|
abstract ProbeMetaData |
description(java.lang.String description)
Sets the description of the probe.
|
abstract ProbeMetaData |
events(boolean events)
Configures if probe retain single events.
|
abstract ProbeMetaData |
openTypeName(java.lang.String name)
Sets the name of the automatic event type for the opening of a control object.
|
abstract ProbeMetaData |
payload(boolean payload)
Configures if the probe collects payload information.
|
abstract ProbeMetaData |
payloadName(java.lang.String payloadName)
Sets the name of the payload.
|
abstract ProbeMetaData |
recordOnStartup(boolean startRecording)
Configures if the probe should record data on startup.
|
abstract ProbeMetaData |
startTelemetryGroup(java.lang.String name)
Starts a group of telemetries that can be displayed in the same graph.
|
abstract ProbeMetaData |
telemetry(boolean telemetry)
Configures if the probe collects telemetry data.
|
public static ProbeMetaData create(java.lang.String name)
name
- the name of the probe. This name is displayed in the JProfiler GUI.public abstract ProbeMetaData description(java.lang.String description)
description
- the descriptionpublic abstract ProbeMetaData payload(boolean payload)
false
.
If set to true
, the hot spots view will be shown. The InterceptorContext.createPayloadInfo(String)
and InterceptorContext.createPayloadInfo(String, Object)
and published via
InterceptorContext.addPayloadInfo(PayloadInfo)
for standalone payloads or via create
methods
in the InterceptorContext
that take a PayloadInfo
argument.
This only makes sense for interceptor probes
.
payload
- the valuepublic abstract ProbeMetaData events(boolean events)
false
. If set to true
,
the events view will be shown. If the event count exceeds 100000, events will be consolidated. Events are created
with the create
methods in ProbeContext
and InterceptorContext
and are published with
ProbeContext.addEvent(ProbeEvent)
.events
- the valuepublic abstract ProbeMetaData telemetry(boolean telemetry)
false
. If set to true
,
the telemetries view will be shown. Telemetries must then be configured with calls to
addCustomTelemetry(String, Unit, float)
and addOpenControlObjectTelemetry(String)
.
Telemetry data is sampled calls to TelemetryProbe.fillTelemetryData(ProbeContext, int[])
.
This only makes sense for telemetry probes
.
telemetry
- the valuepublic abstract ProbeMetaData controlObjectView(boolean controlObjectView)
false
. If set to true
,
the control objects view will be shown. Control objects are created with calls to
ProbeContext.createOpenEvent(String, Object)
or InterceptorContext.createOpenEvent(PayloadInfo, Object)
.controlObjectView
- the valuepublic abstract ProbeMetaData recordOnStartup(boolean startRecording)
true
.
In any case, the user can start and stop recording the JProfiler GUI.startRecording
- the valuepublic abstract ProbeMetaData annotatePayloads(boolean annotatePayloads)
false
.
If set to true
, you should also call the payloadName(String)
method, so you can distinguish
payload from different probes in the call tree.annotatePayloads
- the valuepublic abstract ProbeMetaData payloadName(java.lang.String payloadName)
This only has an effect if annotatePayloads(boolean)
is called with
the argument true
.
payloadName
- the namepublic abstract ProbeMetaData startTelemetryGroup(java.lang.String name)
addCustomTelemetry(String, Unit, float)
will be added to this group. To start a new group, you have to call
this method again. If you never call this method, all telemetries will be in separate graphs.
This only makes sense if the telemetry(boolean)
method has been
called with the argument true
.
name
- the name of the telemetry grouppublic abstract ProbeMetaData addOpenControlObjectTelemetry(java.lang.String name)
controlObjectView(boolean)
with the argument true
.
This only makes sense if the telemetry(boolean)
method has been
called with the argument true
.
name
- the name of the telemetrypublic abstract ProbeMetaData addCustomTelemetry(java.lang.String name, Unit unit, float factor)
TelemetryProbe.fillTelemetryData(ProbeContext, int[])
. The order of the invocations of this configuration
method define the indices in the data array of the sampling method.
This only makes sense if the telemetry(boolean)
method has been
called with the argument true
.
name
- the name of the telemetryunit
- the unit of the measurementfactor
- the number by which the measurements should be divided to get the numeric value for the vertical axis.
If your measurements directly correspond to the selected unit, pass 1f
.public abstract ProbeMetaData addAdditionalData(java.lang.String name, DataType dataType)
ProbeEvent.additionalData(Object[])
.
The order of the invocations of this configuration method define the indices in the data array of the
additionalData
method.
This only makes sense if the events(boolean)
method has been called with
the argument true
.
name
- the name of the additional data column. This is displayed as the column header in the events view.dataType
- the data type of the additional data columnpublic abstract ProbeMetaData addAdditionalControlObjectData(java.lang.String name, DataType dataType, boolean nested)
ProbeContext.createOpenEvent(String, Object, Object[])
or ProbeContext.createOpenEvent(String, Object, Object[])
.
The order of the invocations of this configuration method define the indices in the data array of the
createOpenEvent
methods.
This only makes sense if the controlObjectView(boolean)
method has been
called with the argument true
.
name
- the name of the additional data column. This is displayed as the column header in the control objects view.dataType
- the data type of the additional data columnnested
- If the column should be displayed in a nested table. This makes sense if the data is more for debugging purposes,
contains very long text values or if you have a lot of additional data columns. For example, the built-in process
probe shows several columns in a nested table.public abstract ProbeMetaData customTypeNames(java.lang.String... typeNames)
ProbeContext.createCustomEvent(String, int, Object)
and
InterceptorContext.startCustomState(Object, int)
. Custom events that are associated with control objects
are also shown in the time line view in the way the horizontal bar of a control object is colored along the time axis.
To configure the colors of custom events, call customColors(int[])
.typeNames
- the names of the custom events. Not that the index in the array becomes the ID of the custom event.public abstract ProbeMetaData customColors(int... customColors)
customColors
- the colors as RGB values. The RGB value is the result of the getRGB()
method on
a java.awt.Color
object. The array index of each color corresponds to the custom event index in the call to
customTypeNames(String[])
.customTypeNames(String[])
public abstract ProbeMetaData openTypeName(java.lang.String name)
This only makes sense if the controlObjectView(boolean)
method has been
called with the argument true
.
name
- the name of the event typecloseTypeName(String)
public abstract ProbeMetaData closeTypeName(java.lang.String name)
This only makes sense if the controlObjectView(boolean)
method has been
called with the argument true
.
name
- the name of the event type(String)