Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get building time w QT Creator
Forum Updated to NodeBB v4.3 + New Features

How to get building time w QT Creator

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 403 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    icebergenergy
    wrote on 16 Feb 2023, 19:08 last edited by
    #1

    Need to output total building time.
    If possible, please advise for compilation time too

    S 1 Reply Last reply 16 Feb 2023, 19:47
    0
    • I icebergenergy
      16 Feb 2023, 19:08

      Need to output total building time.
      If possible, please advise for compilation time too

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 16 Feb 2023, 19:47 last edited by
      #2

      @icebergenergy Just look at the bottom of "Compilation output" pane after you build, Qt Creator always writes how long it took.

      (Z(:^

      1 Reply Last reply
      0
      • I Offline
        I Offline
        icebergenergy
        wrote on 17 Feb 2023, 17:40 last edited by
        #3

        OK! how is there a way to get same + miliseconds?

        J 1 Reply Last reply 17 Feb 2023, 17:57
        0
        • I icebergenergy
          17 Feb 2023, 17:40

          OK! how is there a way to get same + miliseconds?

          J Online
          J Online
          JonB
          wrote on 17 Feb 2023, 17:57 last edited by
          #4

          @icebergenergy
          I wouldn't have thought you can choose its output format. But for milliseconds you realize it's calling qmake/cmake, and that will be calling up compilers and linkers.... How accurate or useful will milliseconds be here?

          1 Reply Last reply
          1
          • S Offline
            S Offline
            sierdzio
            Moderators
            wrote on 17 Feb 2023, 20:29 last edited by sierdzio
            #5

            Yes, miliseconds is an overkill. You will get different results in seconds for different runs. Compilation time depends on a lot of things you have little control over:

            • maybe OS is doing something in the background?
            • antivirus can be scanning some file just as you build your project
            • your CPU is a bit hotter because it did some heavy tasks a few seconds ago, so boost clocks will behave differently
            • maybe the day is a bit warmer and will affect boost clocks as well
            • is cmake cache cold, does cmake need to re-run?
            • is ccache used?
            • is unity build used?
            • and many, many more

            On my current project, the whole compilation (when both ccache and unity builds are turned off) will take about 2 minutes +- 5 seconds. Using miliseconds here gives no benefit, it might only prompt you to do needless optimisation.

            (Z(:^

            1 Reply Last reply
            1

            1/5

            16 Feb 2023, 19:08

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved