org.apache.synapse.transport.nhttp.util
Class LatencyView
java.lang.Object
org.apache.synapse.transport.nhttp.util.LatencyView
- All Implemented Interfaces:
- LatencyViewMBean
public class LatencyView
- extends Object
- implements LatencyViewMBean
LatencyView provides statistical information related to the latency (overhead) incurred by
the Synapse NHTTP transport, when mediating messages back and forth. Statistics are available
under two main categories, namely short term data and long term data. Short term data is
statistical information related to the last 15 minutes of execution and these metrics are
updated every 5 seconds. Long term data is related to the last 24 hours of execution and
they are updated every 5 minutes. Two timer tasks and a single threaded scheduled executor
is used to perform these periodic calculations.
Latency calculation for a single invocation is carried out by taking timestamps on
following events:
public LatencyView(String latencyMode,
boolean isHttps)
destroy
public void destroy()
notifyTimes
public void notifyTimes(long reqArrival,
long reqDeparture,
long resArrival,
long resDeparture)
- Report the timestamp values captured during mediating messages back and forth
- Parameters:
reqArrival
- The request arrival timereqDeparture
- The request departure time (backend connection establishment)resArrival
- The resoponse arrival timeresDeparture
- The response departure time
getAllTimeAvgLatency
public double getAllTimeAvgLatency()
- Specified by:
getAllTimeAvgLatency
in interface LatencyViewMBean
getLastMinuteAvgLatency
public double getLastMinuteAvgLatency()
- Specified by:
getLastMinuteAvgLatency
in interface LatencyViewMBean
getLast5MinuteAvgLatency
public double getLast5MinuteAvgLatency()
- Specified by:
getLast5MinuteAvgLatency
in interface LatencyViewMBean
getLast15MinuteAvgLatency
public double getLast15MinuteAvgLatency()
- Specified by:
getLast15MinuteAvgLatency
in interface LatencyViewMBean
getLastHourAvgLatency
public double getLastHourAvgLatency()
- Specified by:
getLastHourAvgLatency
in interface LatencyViewMBean
getLast8HourAvgLatency
public double getLast8HourAvgLatency()
- Specified by:
getLast8HourAvgLatency
in interface LatencyViewMBean
getLast24HourAvgLatency
public double getLast24HourAvgLatency()
- Specified by:
getLast24HourAvgLatency
in interface LatencyViewMBean
reset
public void reset()
- Specified by:
reset
in interface LatencyViewMBean
getLastResetTime
public Date getLastResetTime()
- Specified by:
getLastResetTime
in interface LatencyViewMBean
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.