Class InjectorDataCollector

  • All Implemented Interfaces:
    org.objectweb.fractal.api.control.BindingController, DataCollectorAdmin, DataCollectorWrite

    public class InjectorDataCollector
    extends AbstractDataCollector
    Data collector for load-injectors generating ActionEvent events. statistics: - time frame, i.e. ellapsed time since previous getStat() call - average reponse time during this time frame - max response time during this time frame - min response time during this time frame - number of actions during this time frame - throughput (number of actions/sec) during this time frame - number of error occurrences during this time frame - error rate (number of error/sec) during this time frame - response time standard deviation
    Author:
    Bruno Dillenseger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(ActionEvent event)
      new measure available => call super class' add() method and compute statistics
      java.lang.String[] getLabels()
      Get labels describing the statistics
      long[] getStat()
      Get statistics computed since previous call (or initialization for 1st call).
      void init​(java.io.Serializable testId, java.lang.String scenarioId)
      new test initialization => call super class' init() method and resets all statistics, including the cumulative ones
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LABELS

        public static final java.lang.String[] LABELS
      • statStartTime

        protected long statStartTime
        absolute date of previous call to getStat()
      • successfullActions

        protected long successfullActions
        number of successful actions performed since the previous call to getStat()
      • errors

        protected long errors
        number of error occurrences since the previous call to getStat()
      • actionMinDuration

        protected long actionMinDuration
        duration of the quickest action since the previous call to getStat()
      • actionMaxDuration

        protected long actionMaxDuration
        duration of the longest action since the previous call to getStat()
      • actionTotalDuration

        protected long actionTotalDuration
        total amount of time spent by actions since the previous call to getStat()
      • actionTotalSquareDuration

        protected double actionTotalSquareDuration
        sum of square response times since the previous call to getStat(), used to compute moving standard deviation
      • cumulativeSuccessfullActions

        protected long cumulativeSuccessfullActions
        total number of actions performed since current test initialization
      • cumulativeErrors

        protected long cumulativeErrors
        total number of error occurrences since current test initialization
    • Constructor Detail

      • InjectorDataCollector

        public InjectorDataCollector()
    • Method Detail

      • init

        public void init​(java.io.Serializable testId,
                         java.lang.String scenarioId)
        new test initialization => call super class' init() method and resets all statistics, including the cumulative ones
        Specified by:
        init in interface DataCollectorWrite
        Overrides:
        init in class AbstractDataCollector
        Parameters:
        testId - test identifier
        scenarioId - blade identifier
      • getStat

        public long[] getStat()
        Get statistics computed since previous call (or initialization for 1st call).
        Returns:
        injector action statistics
        See Also:
        DataCollectorAdmin.getLabels()
      • getLabels

        public java.lang.String[] getLabels()
        Description copied from interface: DataCollectorAdmin
        Get labels describing the statistics
        Returns:
        the statistics labels, in the same order as the values returned by getStat()
        See Also:
        DataCollectorAdmin.getStat()