Package org.aksw.iguana.rp.metrics.impl
Class EachQueryMetric
- java.lang.Object
-
- org.aksw.iguana.rp.metrics.AbstractMetric
-
- org.aksw.iguana.rp.metrics.impl.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 Summary
Constructors Constructor Description EachQueryMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
This method will be called, as soon as the associated Experiment Task is finished.void
receiveData(java.util.Properties p)
This method should implement what to do with one result.-
Methods inherited from class org.aksw.iguana.rp.metrics.AbstractMetric
getDescription, getMetricProperty, getName, getShortName, getStorageManager, getSubject, getTaskResource, sendData, setMetaData, setStorageManager
-
-
-
-
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. TheMetricManager
will try to close the Metric still, thus it should be checked if that was the case.- Specified by:
close
in interfaceMetric
- Overrides:
close
in classAbstractMetric
-
-