@Test public void defaultPerformanceConfigTest() { VerifiableProperties properties = new VerifiableProperties(new Properties()); PerformanceConfig config = new PerformanceConfig(properties); for (RestMethod method : EnumSet.of(RestMethod.GET, RestMethod.DELETE, RestMethod.POST, RestMethod.HEAD, RestMethod.PUT)) { Criteria criteria = config.nonSuccessRequestThresholds.get(method).getCriteria(PerformanceIndex.RoundTripTime); assertEquals("Threshold value is not as expected", criteria.getThresholdValue(), Long.MAX_VALUE); } assertEquals("Threshold value is not as expected", config.successGetTimeToFirstByteThreshold, Long.MAX_VALUE); assertEquals("Threshold value is not as expected", config.successGetAverageBandwidthThreshold, 0); assertEquals("Threshold value is not as expected", config.successPostAverageBandwidthThreshold, 0); }
public Criteria getCriteria(PerformanceIndex performanceIndex) { return perfIndicesAndCriteria.get(performanceIndex); }
Thresholds { public Criteria getCriteria(PerformanceIndex performanceIndex) { return perfIndicesAndCriteria.get(performanceIndex); } }
Thresholds { public Criteria getCriteria(PerformanceIndex performanceIndex) { return perfIndicesAndCriteria.get(performanceIndex); } Thresholds(Map<PerformanceIndex, Criteria> perfIndicesAndCriteria); }
Thresholds { public Criteria getCriteria(PerformanceIndex performanceIndex) { return perfIndicesAndCriteria.get(performanceIndex); } Thresholds(Map<PerformanceIndex, Criteria> perfIndicesAndCriteria); boolean checkThresholds(Map<PerformanceIndex, Long> dataToCheck); Criteria getCriteria(PerformanceIndex performanceIndex); }
Thresholds { public Criteria getCriteria(PerformanceIndex performanceIndex) { return perfIndicesAndCriteria.get(performanceIndex); } Thresholds(Map<PerformanceIndex, Criteria> perfIndicesAndCriteria); boolean checkThresholds(Map<PerformanceIndex, Long> dataToCheck); Criteria getCriteria(PerformanceIndex performanceIndex);  }