Class EachQueryMetric

  • All Implemented Interfaces:
    Metric

    @Shorthand("EachQuery")
    public class EachQueryMetric
    extends AbstractMetric
    This metric will send every query execution time to the storages. Also it will provide if the query succeeded or failed.
    Author:
    f.conrads
    • Constructor Detail

      • EachQueryMetric

        public EachQueryMetric()
    • Method Detail

      • receiveData

        public void receiveData​(java.util.Properties p)
        Description copied from interface: Metric
        This method should implement what to do with one result.

        For example: No Of Queries Per Hour will get the time query time add the time to a variable which keeps track of the total time of all executed queries and increase the number of executed queries if the query was successfully executed.

        Be aware, that in this example, the Metric could be stopped as soon as one hour is reached, or it could be calculate in the close method.

        Assuming, the totaltime is in minutes (it should be calculated in ms though) Latter one will result in the following formular:
        m = 60 * queries / totaltime

        The actual keys of the properties will depend on the core.
        The stress test will send different keys than a completeness test.
        Thus not all metrics are available for each test.
        Hence it should be implemented if the Metric cannot calculate the test results that it will just close itself without adding results.
      • close

        public void close()
        Description copied from interface: Metric
        This method will be called, as soon as the associated Experiment Task is finished. Not all metrics are available for each test. Hence it should be implemented if the Metric cannot calculate the test results that it will just close itself without adding results. The MetricManager will try to close the Metric still, thus it should be checked if that was the case.
        Specified by:
        close in interface Metric
        Overrides:
        close in class AbstractMetric