Results 1 to 5 of 5

Thread: figuring out who's holding up

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default figuring out who's holding up

    guys,

    I have a loop and inside my loop are things that will do some long task. I want to figure which task is taking my time the longest. how can i do this

    example
    for (int i = 0; i < numberOfthinsTobeProcessed; ++i)
    {
    getData(i); // long task
    decodeRawdata() //long task
    updateDatabase()//longtask
    updataPlot() //anotherlong task
    }
    showTimeconsumedHere() <-- I want to show the variuos time consumed of my long tasks
    please help,

    baray98

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: figuring out who's holding up

    Use a profiler.

  3. #3
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: figuring out who's holding up

    please jacek can you elaborate on this?

    baray98

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

  5. #5
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: figuring out who's holding up

    I always start with
    qDebug() << QTime::currentTime();

    and then upon up gdb

  6. The following user says thank you to travis for this useful post:

    baray98 (7th December 2007)

Similar Threads

  1. QTreeView: Holding a line on screen
    By gri in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 11:42
  2. what item QCanvasItemList is holding..
    By Kapil in forum Newbie
    Replies: 17
    Last Post: 25th April 2006, 14:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.