Package com.jprofiler.api.probe.embedded
Class SplitProbe
java.lang.Object
com.jprofiler.api.probe.embedded.SplitProbe
For each split probe, you have to create a subtype of this class and pass it as a class literal
to the methods in
Split. You can override the methods of this class to configure your probe.
If you return true in isPayloads() you can add additional custom telemetries by adding public
static methods to your subclass that return a number type and are annotated with Telemetry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf you returntrueinisPayloads()you can override this method to add a description for your probe in JProfiler's probe section.getName()If you returntrueinisPayloads()you can override this method to specify the display name of your probe.booleanIf you returntrueinisPayloads()but want to remove the default payload telemetries you can override this method and returnfalse.booleanisEvents()If you returntrueinisPayloads(), but want to hide the events view you can override this method and returnfalse.booleanYou can override this method and returntrueto create an entry in the probes section and record your top level splits as payloads.booleanIf you want to create nested splits with this probe you can override this method and returntrue.
-
Constructor Details
-
SplitProbe
public SplitProbe()
-
-
Method Details
-
isReentrant
public boolean isReentrant()If you want to create nested splits with this probe you can override this method and returntrue. Otherwise, only the top level call in the stack to the methods inSplitwill have an effect.- Returns:
- if nested splits will be recorded
-
isPayloads
public boolean isPayloads()You can override this method and returntrueto create an entry in the probes section and record your top level splits as payloads.- Returns:
- if the top level splits should be also recorded as payloads in the probes section
-
getName
If you returntrueinisPayloads()you can override this method to specify the display name of your probe. In the JProfiler UI, this string is used for the view name in the view selector below the "JEE & probes" section. If you not override this method, the simple class name of the probe is used.- Returns:
- the name of your probe
-
getDescription
If you returntrueinisPayloads()you can override this method to add a description for your probe in JProfiler's probe section.- Returns:
- the description of your probe
-
isEvents
public boolean isEvents()If you returntrueinisPayloads(), but want to hide the events view you can override this method and returnfalse.- Returns:
- if events are recorded for payloads
-
isDefaultTelemetries
public boolean isDefaultTelemetries()If you returntrueinisPayloads()but want to remove the default payload telemetries you can override this method and returnfalse. The default telemetries are the event frequency and the average duration telemetries.- Returns:
- if the events view should be displayed
-