Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11058

Implausible JavaScript profiling data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P5: Not important P5: Not important
    • None
    • Qt Creator 3.0.0
    • QML Profiler
    • None
    • Windows 7 64 bit
      Qt 5.0.1 MSVC 2010
      Qt 5.1.1 MinGW 32 bit

      1. Create a new Qt Quick 2 Application project.
      2. Add some JavaScript to main.qml.
        I used:
        import QtQuick 2.0
        
        Rectangle {
            width: 360
            height: 360
            Text {
                text: qsTr("Hello World")
                anchors.centerIn: parent
            }
        
            Timer {
                interval: 2000
                repeat: true
                running: true
                onTriggered: {
                    var i;
                    for (i = 1; i < 2500; ++i) {
                        var j;
                        j = i * i;
                        console.log(j);
        
                    }
                }
            }
        
            MouseArea {
                anchors.fill: parent
                onClicked: {
                    Qt.quit();
                }
            }
        }
        
      3. Configure the project to use a Qt version between 5.0.0 and 5.1.2.
      4. Build the project.
      5. Run the application in QML Profiler for about 10 seconds.
        I frequently get results like the following:
        Location Time in Percent Total Time Self Time in Percent Self Time Details
        main.qml:15 100.32 % 1.277 s 100.00 % 1.273 s onTriggered
        <program> 100.00 % 1.273 s 0.00 % 0.000 µs Main Program

      "100.32 %"? Looks strange to me.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ulherman Ulf Hermann
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes