Interface Metric
-
- All Known Implementing Classes:
CharacterCountMetric,DeserializationSpeedMetric,SerializationSpeedMetric,SizeMetric
public interface MetricDeprecated.As of 1.4.9 use JMH insteadA metric is what's actually recorded. This provides a strategy for what to do with an object for a given product and should return a measurable result. For example it could serialize an object against a product and return how long it took to complete the operation.- See Also:
Harness
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanbiggerIsBetter()Deprecated.Whether a big result is better for this metric.doublerun(Product product, Target target)Deprecated.Run the test and produce a metric.doublerun(Product product, java.lang.Object object)Deprecated.since 1.3java.lang.Stringunit()Deprecated.The unit the metric is recorded in (for reporting purposes).
-
-
-
Method Detail
-
run
double run(Product product, java.lang.Object object) throws java.lang.Exception
Deprecated.since 1.3Run the test and produce a metric.- Parameters:
product- Product to use in test.object- A object to use against the product.- Returns:
- The resulting metric (e.g. 12.22).
- Throws:
java.lang.Exception- If this metric could not be obtained. This will be reported back to theReporter.
-
run
double run(Product product, Target target) throws java.lang.Exception
Deprecated.Run the test and produce a metric.- Parameters:
product- Product to use in test.target- A target to use against the product.- Returns:
- The resulting metric (e.g. 12.22).
- Throws:
java.lang.Exception- If this metric could not be obtained. This will be reported back to theReporter.- Since:
- 1.3
-
unit
java.lang.String unit()
Deprecated.The unit the metric is recorded in (for reporting purposes). e.g. "ms" or "bytes".
-
biggerIsBetter
boolean biggerIsBetter()
Deprecated.Whether a big result is better for this metric.
-
-