Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12689

code inside QBENCHMARK_ONCE macro executed twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 4.7.0
    • Testing: qtestlib
    • None

    Description

      STEPS LEADING TO PROBLEM:
      Check e.g. the following test case: http://meego.gitorious.org/meegotouch/libmeegotouch/blobs/master/benchmarks/pt_mapplication/pt_mapplication.cpp#line40
      Here we use QBENCHMARK_ONCE to measure the time to construct an MApplication object.

      EXPECTED OUTCOME:
      The code in the QBENCHMARK_ONCE macro is really executed just once. We can use QBENCHMARK_ONCE to measure operations which initialize static data.

      ACTUAL OUTCOME:
      The code in the macro is executed once and then a second time to do the actual measurement.
      If the current behavior is really the expected one at least the documentation should mention this.

      Maemo6 bug nr: #181889

      Attachments

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

        Activity

          People

            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            aberres Armin Berres
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes