com.neeve.server.config
Class SrvConfigDescriptor.Heartbeats

java.lang.Object
  extended by com.neeve.server.config.SrvConfigDescriptor.Heartbeats
Enclosing class:
SrvConfigDescriptor

public static final class SrvConfigDescriptor.Heartbeats
extends Object

Configures stats collection and heartbeats for the server.


Method Summary
 long getInterval()
          The interval (in seconds) at which heartbeats are collected.
 Properties getLogging()
          Configures heartbeat logging for a server.
 int getMaxTrackableSeriesValue()
          The maximum value that a series stats histogram can record.
 float getPoolDepletionThreshold()
          The percentage decrement at which a preallocated pool triggers inclusion of pool stats in a hearbeat.
 SrvConfigDescriptor.HeartbeatTracing getTracing()
          /** Configures heartbeat tracing for a server.
 boolean isCollectIndividualThreadStats()
          Configures whether thread stats are collected and reported in heartbeats.
 boolean isCollectNonZGStats()
          Returns whether or not stats that produce garbage as a result of being collected are enabled.
 boolean isCollectPoolStats()
          Configures whether pool stats are collected and reported in heartbeats.
 boolean isCollectSeriesDatapoints()
          Configures whether series stats datapoints are included in heartbeats.
 boolean isCollectSeriesStats()
          Configures whether series stats are collected in heartbeats.
 boolean isEnabled()
          Configures whether server heartbeats are enabled.
 boolean isIncludeMessageTypeStats()
          Returns whether or not message type stats are included in heartbeats (when enabled for the app).
 void load(Properties props, boolean shortForm)
          Loads the heartbeat config from the provided properties and removes the loaded values
 void save(Properties props, boolean shortForm)
          Saves the heartbeat config into an config repo property set.
 void setCollectIndividualThreadStats(boolean collectIndividualThreadStats)
          Configures whether thread stats are collected and reported in heartbeats.
 void setCollectNonZGStats(boolean collectNonZGStats)
          Sets whether or not stats that produce garbage as a result of being collected are enabled.
 void setCollectPoolStats(boolean collectPoolStats)
          Configures whether pool stats are collected and reported in heartbeats.
 void setCollectSeriesDatapoints(boolean collectSeriesDatapoints)
          Configures whether series stats datapoints are included in heartbeats.
 void setCollectSeriesStats(boolean collectSeriesStats)
          Configures whether series stats are collected in heartbeats.
 void setEnabled(boolean enabled)
          Configures whether server heartbeats are enabled.
 void setIncludeMessageTypeStats(boolean includeMessageTypeStats)
          Sets whether or not message type stats are included in heartbeats (when enabled for the app).
 void setInterval(long interval)
          Sets the interval (in seconds) at which hearbeats are collected.
 void setMaxTrackableSeriesValue(int maxTrackableSeriesValue)
          The maximum value that a series stats histogram can record.
 void setPoolDepletionThreshold(float poolDepletionThreshold)
          The percentage decrement at which a preallocated pool triggers inclusion of pool stats in a hearbeat.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEnabled

public final boolean isEnabled()
Configures whether server heartbeats are enabled.

Returns:
whether server heartbeats are enabled.

setEnabled

public final void setEnabled(boolean enabled)
Configures whether server heartbeats are enabled.

Parameters:
enabled - whether server heartbeats are enabled.

setInterval

public final void setInterval(long interval)
Sets the interval (in seconds) at which hearbeats are collected.

Parameters:
interval - The heartbeat collection interval.

getInterval

public final long getInterval()
The interval (in seconds) at which heartbeats are collected.

Returns:
The interval (in seconds) at which heartbeats are collected.

isCollectSeriesStats

public final boolean isCollectSeriesStats()
Configures whether series stats are collected in heartbeats.

Latencies statistics and other series type statistics are more cpu and bandwidth intensive to collect and emit. This property can be set to false to disable their collection.

Returns:
whether series stats are collected in heartbeats.

setCollectSeriesStats

public final void setCollectSeriesStats(boolean collectSeriesStats)
Configures whether series stats are collected in heartbeats.

Parameters:
collectSeriesStats - whether series stats are collected in heartbeats.
See Also:
isCollectSeriesStats()

isCollectSeriesDatapoints

public final boolean isCollectSeriesDatapoints()
Configures whether series stats datapoints are included in heartbeats.

Series statistics such as latencie statistics are reported as histogram when series stats collection is enabled. Enabling this property also includes the collected datapoints.

Enabling this property can be extremely bandwidth intensive and is not typically recommended.

Returns:
whether series stats datapoints are included in heartbeats.

setCollectSeriesDatapoints

public final void setCollectSeriesDatapoints(boolean collectSeriesDatapoints)
Configures whether series stats datapoints are included in heartbeats.

Parameters:
collectSeriesDatapoints - whether series stats datapoints are included in heartbeats.
See Also:
isCollectSeriesDatapoints()

getMaxTrackableSeriesValue

public final int getMaxTrackableSeriesValue()
The maximum value that a series stats histogram can record.

Series data is reported using an HDR Histogram which imposes an upper limit on the maximum 'bucket' value that will be recorded.

When this property is not specified the value is set high enough that a 10 minute latency can be recorded in microseconds.

Note that the actual maximum will still be reported in stats although the histograms highes percentile may not reflect the max if it exceed this value.

Returns:
the maximum value that the histogram can record.

setMaxTrackableSeriesValue

public final void setMaxTrackableSeriesValue(int maxTrackableSeriesValue)
The maximum value that a series stats histogram can record.

Parameters:
maxTrackableSeriesValue - the maximum value that the histogram can record.
See Also:
getMaxTrackableSeriesValue()

getPoolDepletionThreshold

public final float getPoolDepletionThreshold()
The percentage decrement at which a preallocated pool triggers inclusion of pool stats in a hearbeat.

Normal pool stats are only included in a heartbeat if there were pool misses in the interval. For preallocated pools, however, misses are not expected until the preallocated items are exhausted. For such pools it is generally of interested from a monitoring perspective to observer the rate of depletion of such items.

If a pool is preallocated with 1000 items and this property is set to 10, pool stats will be emitted for the pool when its size drops below 900, 800, 700, until its size reaches 0 (at which point subsequent misses would cause it to be included on every heartbeat).

Setting this to a value greater than 100 or less than or equal to 0 disables depletion threshold reporting.

Returns:
The percentage threshold.

setPoolDepletionThreshold

public final void setPoolDepletionThreshold(float poolDepletionThreshold)
The percentage decrement at which a preallocated pool triggers inclusion of pool stats in a hearbeat.

Parameters:
poolDepletionThreshold - The percentage threshold.
See Also:
getPoolDepletionThreshold()

isCollectPoolStats

public final boolean isCollectPoolStats()
Configures whether pool stats are collected and reported in heartbeats.

When pool stats are enabled pool stats are included for pools that experienced a pool miss in the collection interval, or preallocated pool items falls below a poolDepletionThreshold

Returns:
whether pool stats are collected and reported in heartbeats.

setCollectPoolStats

public final void setCollectPoolStats(boolean collectPoolStats)
Configures whether pool stats are collected and reported in heartbeats.

Parameters:
collectPoolStats - whether pool stats are collected and reported in heartbeats.
See Also:
isCollectPoolStats()

isCollectIndividualThreadStats

public final boolean isCollectIndividualThreadStats()
Configures whether thread stats are collected and reported in heartbeats.

When thread stats are enabled thread stats for each active thread in the system are reported in heartbeats.

Returns:
whether individual thread stats are collected and reported in heartbeats.

setCollectIndividualThreadStats

public final void setCollectIndividualThreadStats(boolean collectIndividualThreadStats)
Configures whether thread stats are collected and reported in heartbeats.

Parameters:
collectIndividualThreadStats - whether thread stats are collected and reported in heartbeats.
See Also:
isCollectIndividualThreadStats()

isCollectNonZGStats

public boolean isCollectNonZGStats()
Returns whether or not stats that produce garbage as a result of being collected are enabled.

Returns:
true if non zg stats are collected.
See Also:
setCollectNonZGStats(boolean)

setCollectNonZGStats

public void setCollectNonZGStats(boolean collectNonZGStats)
Sets whether or not stats that produce garbage as a result of being collected are enabled.

Some stats involve using reflection or 3rd party apis that create garbage. This property can be set to false to suppress collection of those stats. Currently the list of stats that may produce garbage include:

Parameters:
collectNonZGStats - whether or not to enabled non zg stats collection

isIncludeMessageTypeStats

public boolean isIncludeMessageTypeStats()
Returns whether or not message type stats are included in heartbeats (when enabled for the app).

Returns:
true if message type stats will inlcuded in heartbeats (when enabled for the app).
See Also:
setIncludeMessageTypeStats(boolean)

setIncludeMessageTypeStats

public void setIncludeMessageTypeStats(boolean includeMessageTypeStats)
Sets whether or not message type stats are included in heartbeats (when enabled for the app).

When captureMessageTypeStats is enabled for an app, the AepEngine will record select statistics on a per message type basis. Because inclusion of per message type stats can significantly increase the size of heartbeats, inclusion in heartbeats is disabled by default.

Note: For message type stats to be included in heartbeats, both captureMessageTypeStats for the app must be set to true (capture is disabled by default because recording them is costly), and includeMessageTypeStats must be set to true (inclusion is disabled by default because emitting them is costly).

Parameters:
includeMessageTypeStats - Whether or not to include message type stats (if available).

getTracing

public SrvConfigDescriptor.HeartbeatTracing getTracing()
/** Configures heartbeat tracing for a server.

Returns:
The heartbeat tracing configuration.

getLogging

public Properties getLogging()
Configures heartbeat logging for a server.

Returns:
The heartbeat logging configuration.

save

public void save(Properties props,
                 boolean shortForm)
Saves the heartbeat config into an config repo property set.

Parameters:
props - the props into which to save.
shortForm - If props should not include the 'nv.server.' prefix.

load

public void load(Properties props,
                 boolean shortForm)
Loads the heartbeat config from the provided properties and removes the loaded values

Parameters:
props - The properties from which to load.
shortForm - If props should not include the 'nv.server.' prefix.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.