use of org.eclipse.test.internal.performance.eval.Evaluator in project eclipse.platform.releng by eclipse.
the class Performance method assertPerformanceInRelativeBand.
/**
* Asserts that the measurement specified by the dimension captured in the given performance meter is within a certain range
* with respect to some reference value. If the performance meter doesn't provide the specified dimension, the call has no
* effect.
*
* @param performanceMeter
* the performance meter
* @param dim
* the Dimension to check
* @param lowerPercentage
* a negative number indicating the percentage the measured value is allowed to be smaller than some reference value
* @param upperPercentage
* a positive number indicating the percentage the measured value is allowed to be greater than some reference value
* @throws RuntimeException
* if the properties do not hold
*/
public void assertPerformanceInRelativeBand(PerformanceMeter performanceMeter, Dimension dim, int lowerPercentage, int upperPercentage) {
Evaluator e = new Evaluator();
e.setAssertCheckers(new AssertChecker[] { new RelativeBandChecker((Dim) dim, 1.0 + (lowerPercentage / 100.0), 1.0 + (upperPercentage / 100.0)) });
e.evaluate(performanceMeter);
}
use of org.eclipse.test.internal.performance.eval.Evaluator in project eclipse.platform.releng by eclipse.
the class Performance method assertPerformance.
/**
* Asserts default properties of the measurements captured by the given performance meter.
*
* @param performanceMeter
* the performance meter
* @throws RuntimeException
* if the properties do not hold
*/
public void assertPerformance(PerformanceMeter performanceMeter) {
if (fDefaultEvaluator == null) {
fDefaultEvaluator = new Evaluator();
fDefaultEvaluator.setAssertCheckers(new AssertChecker[] { new RelativeBandChecker(InternalDimensions.ELAPSED_PROCESS, 0.0f, 1.10f) // new RelativeBandChecker(InternalDimensions.CPU_TIME, 0.0f, 1.10f),
// new RelativeBandChecker(InternalDimensions.WORKING_SET, 0.0f, 3.00f),
// new RelativeBandChecker(InternalDimensions.USED_JAVA_HEAP, 0.0f, 2.00f),
// new RelativeBandChecker(InternalDimensions.SYSTEM_TIME, 0.0f, 1.10f)
});
}
fDefaultEvaluator.evaluate(performanceMeter);
}
use of org.eclipse.test.internal.performance.eval.Evaluator in project eclipse.platform.releng by eclipse.
the class Performance method assertPerformanceInAbsoluteBand.
/**
* Asserts that the measurement specified by the dimension captured in the given performance meter is within a certain range
* with respect to some reference value. If the performance meter doesn't provide the specified dimension, the call has no
* effect.
*
* @param performanceMeter
* the performance meter
* @param dim
* the Dimension to check
* @param lowerBand
* a negative number indicating the absolute amount the measured value is allowed to be smaller than some reference
* value
* @param upperBand
* a positive number indicating the absolute amount the measured value is allowed to be greater than some reference
* value
* @throws RuntimeException
* if the properties do not hold
*/
public void assertPerformanceInAbsoluteBand(PerformanceMeter performanceMeter, Dimension dim, int lowerBand, int upperBand) {
Evaluator e = new Evaluator();
e.setAssertCheckers(new AssertChecker[] { new AbsoluteBandChecker((Dim) dim, lowerBand, upperBand) });
e.evaluate(performanceMeter);
}
Aggregations