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:
Having taken these timestamps, the latency for the invocation is calculated as follows:
Latency = (t4 - t1) - (t3 - t2)
| Constructor and Description |
|---|
LatencyView(boolean isHttps) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
double |
getAllTimeAvgLatency() |
double |
getLast15MinuteAvgLatency() |
double |
getLast24HourAvgLatency() |
double |
getLast5MinuteAvgLatency() |
double |
getLast8HourAvgLatency() |
double |
getLastHourAvgLatency() |
double |
getLastMinuteAvgLatency() |
Date |
getLastResetTime() |
void |
notifyTimes(long reqArrival,
long reqDeparture,
long resArrival,
long resDeparture)
Report the timestamp values captured during mediating messages back and forth
|
void |
reset() |
public LatencyView(boolean isHttps)
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultpublic void destroy()
public void notifyTimes(long reqArrival,
long reqDeparture,
long resArrival,
long resDeparture)
reqArrival - The request arrival timereqDeparture - The request departure time (backend connection establishment)resArrival - The response arrival timeresDeparture - The response departure timepublic double getAllTimeAvgLatency()
getAllTimeAvgLatency in interface LatencyViewMBeanpublic double getLastMinuteAvgLatency()
getLastMinuteAvgLatency in interface LatencyViewMBeanpublic double getLast5MinuteAvgLatency()
getLast5MinuteAvgLatency in interface LatencyViewMBeanpublic double getLast15MinuteAvgLatency()
getLast15MinuteAvgLatency in interface LatencyViewMBeanpublic double getLastHourAvgLatency()
getLastHourAvgLatency in interface LatencyViewMBeanpublic double getLast8HourAvgLatency()
getLast8HourAvgLatency in interface LatencyViewMBeanpublic double getLast24HourAvgLatency()
getLast24HourAvgLatency in interface LatencyViewMBeanpublic void reset()
reset in interface LatencyViewMBeanpublic Date getLastResetTime()
getLastResetTime in interface LatencyViewMBeanCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.