Merge lp:~davmor2/software-center/add-performance into lp:software-center

Proposed by Dave Morley
Status: Merged
Merge reported by: Gary Lasker
Merged at revision: not available
Proposed branch: lp:~davmor2/software-center/add-performance
Merge into: lp:software-center
Diff against target: 28 lines (+4/-4)
1 file modified
contrib/USC-start-stop-times.py (+4/-4)
To merge this branch: bzr merge lp:~davmor2/software-center/add-performance
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+105634@code.launchpad.net

Description of the change

Simply adds the memory and cpu stat grab to the contrib/USC-start-stop script, to enable this feature you need python-statgrab and python-ldtp installed and be have screenreader enabled but not necasserily running.

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

Looks fine to me, thanks a lot, Dave!

review: Approve
Revision history for this message
Gary Lasker (gary-lasker) wrote :

I merged this to the 5.2 branch so we will have these stats in place for Precise. This will go to trunk as well once we do the next 5.2 mergeback.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'contrib/USC-start-stop-times.py'
2--- contrib/USC-start-stop-times.py 2012-04-11 16:59:40 +0000
3+++ contrib/USC-start-stop-times.py 2012-05-14 10:58:18 +0000
4@@ -13,14 +13,14 @@
5 ldtp.launchapp('./software-center')
6 assert ldtp.waittillguiexist('frmUbuntuSoftwareCent*')
7 self.msgs = []
8- a = "Time taken for the frame to open is " + str(
9- time.time() - start_time)
10+ a = "Time taken for the frame to open is: " + str(
11+ time.time() - start_time) + " Cpu percentage: " + str(ldtp.getcpustat('software-center')) + " Memory usage in MB: " + str(ldtp.getmemorystat('software-center'))
12 self.msgs.append(a)
13
14 def tearDown(self):
15 ldtp.selectmenuitem('frmUbuntuSoftwareCent*', 'mnuClose')
16 assert ldtp.waittillguinotexist('frmUbuntuSoftwareCent*')
17- c = "This test took a total of " + str(time.time() - start_time)
18+ c = "This test took a total of " + str(time.time() - start_time) + " Cpu percentage: " + str(ldtp.getcpustat('software-center')) + " Memory usage in MB: " + str(ldtp.getmemorystat('software-center'))
19 self.msgs.append(c)
20 print '\n'.join(self.msgs)
21
22@@ -28,7 +28,7 @@
23 ldtp.waittillguiexist('frmUbuntuSoftwareCent*', 'btnAccessories')
24 assert ldtp.objectexist('frmUbuntuSoftwareCent*', 'btnAccessories')
25 b = "Time taken from start to find the Accessories button " + str(
26- time.time() - start_time)
27+ time.time() - start_time) + " Cpu percentage: " + str(ldtp.getcpustat('software-center')) + " Memory usage in MB: " + str(ldtp.getmemorystat('software-center'))
28 self.msgs.append(b)
29
30