Changeset 7043 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2014-05-02T00:43:10+02:00 (10 years ago)
Author:
bastiK
Message:

see #9691 - added command line option to enable debug level trace
added map paint performance output for trace level debug

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r7040 r7043  
    14041404
    14051405        highlightWaySegments = data.getHighlightedWaySegments();
     1406       
     1407        long timeStart=0, timePhase1=0, timeFinished;
     1408        if (Main.isTraceEnabled()) {
     1409            timeStart = System.currentTimeMillis();
     1410            System.err.print("BENCHMARK: rendering ");
     1411            Main.debug(null);
     1412        }
    14061413
    14071414        StyleCollector sc = new StyleCollector(drawArea, drawMultipolygon, drawRestriction);
     
    14091416        collectWayStyles(data, sc, bbox);
    14101417        collectRelationStyles(data, sc, bbox);
     1418       
     1419        if (Main.isTraceEnabled()) {
     1420            timePhase1 = System.currentTimeMillis();
     1421            System.err.print("phase 1 (calculate styles): " + (timePhase1 - timeStart) + " ms");
     1422        }
     1423       
    14111424        sc.drawAll();
    14121425        sc = null;
     1426
     1427        if (Main.isTraceEnabled()) {
     1428            timeFinished = System.currentTimeMillis();
     1429            System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms");
     1430        }
     1431
    14131432        drawVirtualNodes(data, bbox);
    14141433    }
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r7033 r7043  
    154154        /** --debug                                   Print debugging messages to console */
    155155        DEBUG(false),
     156        /** --trace                                   Print detailed debugging messages to console */
     157        TRACE(false),
    156158        /** --language=<language>               Set the language */
    157159        LANGUAGE(true),
     
    318320        }
    319321
    320         if (args.containsKey(Option.DEBUG)) {
     322        if (args.containsKey(Option.DEBUG) || args.containsKey(Option.TRACE)) {
    321323            // Enable JOSM debug level
    322324            logLevel = 4;
    323325            // Enable debug in OAuth signpost
    324326            Preferences.updateSystemProperty("debug", "true");
    325             Main.debug(tr("Print debugging messages to console"));
     327            Main.info(tr("Printing debugging messages to console"));
     328        }
     329
     330        if (args.containsKey(Option.TRACE)) {
     331            // Enable JOSM debug level
     332            logLevel = 5;
     333            Main.info(tr("Enabled detailed debug level (trace)"));
    326334        }
    327335
Note: See TracChangeset for help on using the changeset viewer.