Merge lp:~mvo/software-center/profiling1 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 2611
Proposed branch: lp:~mvo/software-center/profiling1
Merge into: lp:software-center
Diff against target: 28 lines (+10/-3)
1 file modified
software-center (+10/-3)
To merge this branch: bzr merge lp:~mvo/software-center/profiling1
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Michael Vogt Pending
Review via email: mp+86081@code.launchpad.net

Description of the change

Tiny branch to add another profiling data point.

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Nice! Thanks mvo.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'software-center'
2--- software-center 2011-12-15 15:39:22 +0000
3+++ software-center 2011-12-16 16:44:52 +0000
4@@ -142,14 +142,21 @@
5
6 # DEBUG/PROFILE mode
7 if options.measure_startup_time:
8+ logger = logging.getLogger("softwarecenter.performance")
9 with ExecutionTime("show() & gtk events until visible"):
10 app.run(args)
11+ main_visible = False
12 while not (app.available_pane.cat_view and
13 app.available_pane.cat_view.get_visible()):
14- while Gtk.events_pending():
15+ if Gtk.events_pending():
16 Gtk.main_iteration()
17- time_to_visible = time.time() - time_entering_main
18- print(time_to_visible)
19+ if not main_visible and app.window_main.get_visible():
20+ logger.debug("** main window visible after: %s seconds" % (
21+ time.time() - time_entering_main))
22+ main_visible = True
23+ time_to_ready = time.time() - time_entering_main
24+ print(time_to_ready)
25+ logger.debug("** main window fully ready after: %s seconds" % time_to_ready)
26 sys.exit(0)
27
28 # run it normally

Subscribers

People subscribed via source and target branches