public class MetricComparator extends Object
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<Long> |
approxMillis(long originalMillis)
Check that a nanosecond time is within 20% of an expected time in milliseconds
|
static org.hamcrest.Matcher<Long> |
lessThanMillis(long originalMillis)
Check that a nanosecond time is less than an expected time in milliseconds
|
public static org.hamcrest.Matcher<Long> approxMillis(long originalMillis)
Note that this method applies any timeout scaling configured in TCKConfig, does the millseconds to nanoseconds
conversion and creates a Matcher
to do the check.
Useful for checking the results from Histograms.
originalMillis
- the expected time in millisecondsMatcher
which matches against a time in nanosecondspublic static org.hamcrest.Matcher<Long> lessThanMillis(long originalMillis)
This method applies any timeout scaling configured in TCKConfig, does the millseconds to nanoseconds conversion
and creates a Matcher
to do the check.
Useful for checking the results from Histograms.
originalMillis
- the expected time in millisecondsMatcher
which matches against a time in nanosecondsCopyright © 2016 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.