Class NetworkMonitor

  • All Implemented Interfaces:
    jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

    public class NetworkMonitor
    extends jakarta.servlet.http.HttpServlet
    Utility to collect response time and throughput on a per second basis.
    See Also:
    Serialized Form
    • Constructor Detail

      • NetworkMonitor

        public NetworkMonitor()
    • Method Detail

      • isCollectStats

        public static boolean isCollectStats()
        Returns:
        the collectStats
      • setCollectStats

        public static void setCollectStats​(boolean aCollectStats)
        Parameters:
        aCollectStats - the collectStats to set
      • getInstanceNames

        public static Set<String> getInstanceNames()
      • start

        public long start()
      • end

        public void end​(long start)
      • reset

        public void reset()
      • getHistoryResponseTime

        public float[] getHistoryResponseTime()
      • getHistoryThroughput

        public float[] getHistoryThroughput()
      • responseTime

        public float responseTime()
      • getLastHistoryResponseTime

        public float getLastHistoryResponseTime()
      • throughput

        public float throughput()
      • getLastHistoryThroughput

        public float getLastHistoryThroughput()
      • doGet

        public void doGet​(jakarta.servlet.http.HttpServletRequest req,
                          jakarta.servlet.http.HttpServletResponse res)
                   throws jakarta.servlet.ServletException,
                          IOException
        Overrides:
        doGet in class jakarta.servlet.http.HttpServlet
        Throws:
        jakarta.servlet.ServletException
        IOException