test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java
changeset 51138 914f305ba6fa
parent 51074 bf686c47c109
child 51559 57f1bf06742e
equal deleted inserted replaced
51137:e3bcc86855dd 51138:914f305ba6fa
    60 
    60 
    61   private static void checkDifference(int first, int second) {
    61   private static void checkDifference(int first, int second) {
    62     double diff = Math.abs(first - second) * 100;
    62     double diff = Math.abs(first - second) * 100;
    63     diff /= first;
    63     diff /= first;
    64 
    64 
    65     // Accept a 10% error rate: with objects being allocated: this allows a bit of room in
    65     // Accept a 10% error interval: with objects being allocated: this allows a bit of room in
    66     // case other items are getting allocated during the test.
    66     // case other items are getting allocated during the test.
    67     if (diff > 10) {
    67     if (diff > 10) {
    68       throw new RuntimeException("Error rate is over the accepted rate: " + diff
    68       throw new RuntimeException("Error interval is over the accepted interval: " + diff
    69           + ": " + first + " , " + second);
    69           + ": " + first + " , " + second);
    70     }
    70     }
    71   }
    71   }
    72 
    72 
    73   private static void compareSampledAndVM() {
    73   private static void compareSampledAndVM() {