Track startup time in ocarina/__init__.py

The ocarina package can track the startup time better than the launcher
script.  Tracking it in the package will also make startup time
available to other callers.
This commit is contained in:
Bryan Schumaker 2010-12-27 12:19:22 -05:00
parent 0c636bfd56
commit bdd9c331e8
2 changed files with 6 additions and 8 deletions

View File

@ -1,12 +1,8 @@
#!/usr/bin/python2
# Bryan Schumaker (8/13/2010)
import datetime
now = datetime.datetime.now
before = now()
import libsaria
import ocarina
import libsaria
from ocarina import window
from ocarina import body
from ocarina import library
@ -30,8 +26,7 @@ playlist.init()
queue.init()
library.init()
after = now()
print "Startup took:", after-before
print "Startup took:", ocarina.now() - ocarina.__start__
ocarina.startup()
body.init_page("Library")

View File

@ -1,5 +1,9 @@
# Bryan Schumaker (8/13/2010)
import datetime
now = datetime.datetime.now
__start__ = now()
import gtk
import gobject
import pango
@ -19,7 +23,6 @@ if __bug__ > 0:
if __dev__ == True:
__vers__ += "-dev"
def startup():
libsaria.startup()
gdk.threads_init()