Class TestStats


  • public class TestStats
    extends java.lang.Object
    Simple statistical report generator on injectors' response times and throughput. Aggregates all measures with the same "action type".
    Author:
    Bruno Dillenseger
    • Field Detail

      • CLEANINGFACTOR_PROPNAME

        public static final java.lang.String CLEANINGFACTOR_PROPNAME
        See Also:
        Constant Field Values
      • CLEANINGFACTOR_PROPDEFAULT

        public static final java.lang.String CLEANINGFACTOR_PROPDEFAULT
        See Also:
        Constant Field Values
      • CLEANINGLIMIT_PROPNAME

        public static final java.lang.String CLEANINGLIMIT_PROPNAME
        See Also:
        Constant Field Values
      • CLEANINGLIMIT_PROPDEFAULT

        public static final java.lang.String CLEANINGLIMIT_PROPDEFAULT
        See Also:
        Constant Field Values
    • Constructor Detail

      • TestStats

        public TestStats​(StorageRead storage)
                  throws ClifException
        Initiates a simple statistical report generator for the latest test execution in the provided storage object.
        Parameters:
        storage - a CLIF storage implementation
        Throws:
        ClifException - could not find a test execution
      • TestStats

        public TestStats​(StorageRead storage,
                         java.lang.String testName)
                  throws ClifException
        Initiates a simple statistical report generator for the given test execution in the provided storage object.
        Parameters:
        storage - a CLIF storage implementation
        testName - the name of the target test execution When null or empty, the latest test execution is chosen.
        Throws:
        ClifException - could not find the test execution
    • Method Detail

      • compute

        public void compute​(QuickstatProgress monitor)
                     throws ClifException
        The first call to this method actually reads measures and computes statistics. Possible next calls do nothing. The computation progress may be monitored, and stopped.
        Parameters:
        monitor - an optional object for monitoring the progress of the statistics computation, and possibly for stopping it.
        Throws:
        ClifException - troubles with the CLIF storage component
      • report

        public void report​(java.io.PrintStream out)
                    throws ClifException
        First calls the compute method() to make sure the statistics are ready, then prints the report into the provided stream. The report gives for each action type value, and then globally:
        • the number of successful requests
        • the minimum response time
        • the maximum response time
        • the response time mean
        • the response time median
        • the response time standard deviation
        • the successful requests throughput
        • the response time mean
        • the number of request errors
        Value "NaN" means the value is not available.
        Parameters:
        out - the stream where to print the report.
        Throws:
        ClifException
        See Also:
        compute(QuickstatProgress)