Class SessionStats
- java.lang.Object
-
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
-
- com.inductiveautomation.perspective.gateway.session.SessionStats
-
public class SessionStats extends AbstractLifecycle
-
-
Constructor Summary
Constructors Constructor Description SessionStats(PerspectiveContext context, java.util.UUID sessionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiTimerContext
beginExpressionTimer()
Use this for timing expressions to correctly update both the session timer and the shared global timerMultiTimerContext
beginScriptTimer()
Use this for timing scripts to correctly update both the session timer and the shared global timerjava.util.Map<java.lang.String,com.codahale.metrics.Metric>
getAllMetrics()
com.codahale.metrics.Timer
getExpressionTimer()
The timer for expressions executed by this session.com.codahale.metrics.Timer
getFetchTimer()
com.codahale.metrics.Meter
getMessagesRecv()
com.codahale.metrics.Meter
getMessagesSent()
java.lang.String
getPrefix()
com.codahale.metrics.Meter
getPropertyChanges()
com.codahale.metrics.Timer
getQueueTaskTimer()
com.codahale.metrics.Timer
getScriptTimer()
The timer for scripts executed by this session.java.lang.String
name(java.lang.String... names)
MetricBuilder
newBuilder(java.lang.String name)
Returns a builder set up with the registry and correctly prefixed namevoid
notifyPropertyChanged()
Call this whenever a property changes.void
notifyReconnected()
protected void
onShutdown()
protected void
onStartup()
void
register(java.lang.String name, com.codahale.metrics.Metric metric)
void
remove(java.lang.String name)
-
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
-
-
-
Constructor Detail
-
SessionStats
public SessionStats(PerspectiveContext context, java.util.UUID sessionId)
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix()
-
name
public java.lang.String name(java.lang.String... names)
-
register
public void register(java.lang.String name, com.codahale.metrics.Metric metric)
-
newBuilder
public MetricBuilder newBuilder(java.lang.String name)
Returns a builder set up with the registry and correctly prefixed name
-
remove
public void remove(java.lang.String name)
-
getMessagesRecv
public com.codahale.metrics.Meter getMessagesRecv()
-
getMessagesSent
public com.codahale.metrics.Meter getMessagesSent()
-
getQueueTaskTimer
public com.codahale.metrics.Timer getQueueTaskTimer()
-
getFetchTimer
public com.codahale.metrics.Timer getFetchTimer()
-
getPropertyChanges
public com.codahale.metrics.Meter getPropertyChanges()
-
notifyPropertyChanged
public void notifyPropertyChanged()
Call this whenever a property changes. Updates both the session property-change meter and the global one.
-
notifyReconnected
public void notifyReconnected()
-
getScriptTimer
public com.codahale.metrics.Timer getScriptTimer()
The timer for scripts executed by this session. See also @beginScriptTimer
-
getExpressionTimer
public com.codahale.metrics.Timer getExpressionTimer()
The timer for expressions executed by this session. See alsobeginExpressionTimer()
-
beginScriptTimer
public MultiTimerContext beginScriptTimer()
Use this for timing scripts to correctly update both the session timer and the shared global timer
-
beginExpressionTimer
public MultiTimerContext beginExpressionTimer()
Use this for timing expressions to correctly update both the session timer and the shared global timer
-
onStartup
protected void onStartup()
- Specified by:
onStartup
in classAbstractLifecycle
-
onShutdown
protected void onShutdown()
- Specified by:
onShutdown
in classAbstractLifecycle
-
getAllMetrics
public java.util.Map<java.lang.String,com.codahale.metrics.Metric> getAllMetrics()
-
-