Ignore:
Timestamp:
2014-08-17T12:25:09+02:00 (10 years ago)
Author:
Don-vip
Message:

tune performance test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java

    r7068 r7429  
    88import org.openstreetmap.josm.data.coor.LatLonTest;
    99
     10/**
     11 * Checks that rounding of coordinates is not too slow.
     12 */
    1013public class RoundingPerformanceTest {
    1114
    1215    private static double oldRoundToOsmPrecision(double value) {
    13         return Math.round(value / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION; // Old method, causes rounding errors, but efficient
     16        // Old method, causes rounding errors, but efficient
     17        return Math.round(value / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION;
    1418    }
    1519
     20    /**
     21     * Checks that rounding of coordinates is not too slow.
     22     */
    1623    @Test
    1724    public void test() {
     
    3744        System.out.println("New time: "+newTime/1000000.0 + " ms");
    3845
    39         assertTrue(newTime <= oldTime*10);
     46        assertTrue(newTime <= oldTime*12);
    4047    }
    4148}
Note: See TracChangeset for help on using the changeset viewer.