Results 1 to 2 of 2

Thread: Using "time" to assess browser start-up time

  1. #1
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,157

    Using "time" to assess browser start-up time

    There are two posts employing "time" to assess how quickly a browser opens:
    http://ubuntuforums.org/showthread.p...9#post12652799
    and
    http://ubuntuforums.org/showthread.p...4#post12653224

    The commands look like this:
    Code:
    time firefox
    and
    Code:
    time chromium-browser
    My confusion is this:
    The results of time will appear only after the browser window is closed.
    man time has this:
    The time command returns when the program exits, stops, or is terminated by a signal.
    Assuming time is otherwise perfect, there's a chance of human error in terms of how efficient we are in closing the browser.
    So is there any means to chain some sort of "exit browser" command to eliminate the chance of human error?
    "Kill" needs to know the process/job ID.

    Ideally, is there a way to measure how quickly any graphical application, not just a browser, opens?
    de gustibus et coloribus non est disputandum -- Wiktionary

  2. #2
    Join Date
    May 2009
    Location
    Fareham, UK
    Beans
    Hidden!
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: Using "time" to assess browser start-up time

    The output of time gives three things:
    real time (total running time)
    user time (time cpu spent processing code in user space)
    sys time (time cpu spent processing code at kernel level)

    So adding up user + sys will give you total time that the cpu was working on the application for. I think its the closest that youll get to working out the uptime, by default this would include time taken for the cpu to close the application too but if you use this method but manually cut the process off from the same terminal you ran the initial time command in (using ctrl+c) you should get a reasonably accurate result of how long the cpu spent opening the application.
    Catch me on Freenode - imark

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
  •