Merge lp:~aacid/ubuntu-performance-tests/work_with_qt_56 into lp:ubuntu-performance-tests

Proposed by Albert Astals Cid
Status: Merged
Merged at revision: 54
Proposed branch: lp:~aacid/ubuntu-performance-tests/work_with_qt_56
Merge into: lp:ubuntu-performance-tests
Diff against target: 49 lines (+28/-4)
1 file modified
kpi/dashqmlmetrics/runner.py (+28/-4)
To merge this branch: bzr merge lp:~aacid/ubuntu-performance-tests/work_with_qt_56
Reviewer Review Type Date Requested Status
Sergio Cazzolato Pending
Review via email: mp+303700@code.launchpad.net

Commit message

Work with Qt 5.6 qmlprofiler

To post a comment you must log in.
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

I modified the implementation and pushed to the trunk, it is working well with the old qmlprofiler version. Could you please validate the trunk against the new qmlprofiler?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'kpi/dashqmlmetrics/runner.py'
--- kpi/dashqmlmetrics/runner.py 2016-07-06 04:26:30 +0000
+++ kpi/dashqmlmetrics/runner.py 2016-08-23 15:59:09 +0000
@@ -124,10 +124,25 @@
124 logger.info('Waiting for dash to start')124 logger.info('Waiting for dash to start')
125 time.sleep(1)125 time.sleep(1)
126126
127 # Determine if qmlprofiler is >= 5.6
128 qmlprofiler = subprocess.Popen(
129 "qmlprofiler -fromStart", shell=True,
130 universal_newlines=True, stdin=subprocess.PIPE,
131 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
132 stdout, stderr = qmlprofiler.communicate()
133
134 is_new_qmlprofiler = "Unknown option" in stderr
135
127 # Start the qmlprofiler, connects to localhost but is really the adb device136 # Start the qmlprofiler, connects to localhost but is really the adb device
128 qmlprofiler = subprocess.Popen(137 if is_new_qmlprofiler:
129 "qmlprofiler -v -fromStart -attach 127.0.0.1 -p 11111", shell=True,138 qmlprofiler = subprocess.Popen(
130 universal_newlines=True, stdin=subprocess.PIPE)139 "qmlprofiler --interactive -attach 127.0.0.1 -p 11111", shell=True,
140 universal_newlines=True, stdin=subprocess.PIPE,
141 stderr=subprocess.PIPE)
142 else:
143 qmlprofiler = subprocess.Popen(
144 "qmlprofiler -v -fromStart -attach 127.0.0.1 -p 11111", shell=True,
145 universal_newlines=True, stdin=subprocess.PIPE)
131146
132 # Wait for autopilot to finish147 # Wait for autopilot to finish
133 logger.info("Waiting for autopilot test to finish")148 logger.info("Waiting for autopilot test to finish")
@@ -135,7 +150,16 @@
135 logger.info("Autopilot test finished")150 logger.info("Autopilot test finished")
136151
137 logger.info("Finishing QML profiler")152 logger.info("Finishing QML profiler")
138 qmlprofiler.communicate("r\nq\n")153 if is_new_qmlprofiler:
154 qmlprofiler.stdin.writelines("f trace_"+str(int(time.time()))+".qtd\n")
155 qmlprofiler.stdin.flush()
156 output = qmlprofiler.stderr.readline()
157 while not "Data written to" in output:
158 output = qmlprofiler.stderr.readline()
159 qmlprofiler.stdin.writelines("q\n")
160 qmlprofiler.communicate()
161 else:
162 qmlprofiler.communicate("r\nq\n")
139 qmlprofiler.wait()163 qmlprofiler.wait()
140 logger.info("QML profiles finished")164 logger.info("QML profiles finished")
141165

Subscribers

People subscribed via source and target branches