Merge lp:~didrocks/ubiquity/telemetry-adjustements into lp:ubiquity

Proposed by Didier Roche-Tolomelli
Status: Merged
Merged at revision: 6599
Proposed branch: lp:~didrocks/ubiquity/telemetry-adjustements
Merge into: lp:ubiquity
Diff against target: 70 lines (+15/-4)
4 files modified
autopilot/ubiquity_autopilot_tests/tests/__init__.py (+2/-1)
ubiquity/frontend/gtk_ui.py (+1/-0)
ubiquity/frontend/kde_ui.py (+1/-0)
ubiquity/telemetry.py (+11/-3)
To merge this branch: bzr merge lp:~didrocks/ubiquity/telemetry-adjustements
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Approve
Ubuntu Installer Team Pending
Review via email: mp+342120@code.launchpad.net

Description of the change

* Set a marker when user is done:
With this, we know how long the last screen took for him or if she/he delayed
the whole install process.
* Convert telemetry string(bool) data to simply bool
* Fix pep8 issue in tests

To post a comment you must log in.
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks Didier. Tested on bionic daily iso and it works as expected, no regression detected. Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/ubiquity_autopilot_tests/tests/__init__.py'
2--- autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-03-22 15:11:13 +0000
3+++ autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-03-26 16:53:30 +0000
4@@ -239,7 +239,8 @@
5
6 :param thirdParty: Boolean, if True selects install third-party
7 software
8- :param minimal_installation: Boolean, if True selects minimal installation option
9+ :param minimal_installation: Boolean, if True selects minimal
10+ installation option
11
12 :param networkConnection: Boolean if True checks the network state box
13 is visible and objects are correct, If
14
15=== modified file 'ubiquity/frontend/gtk_ui.py'
16--- ubiquity/frontend/gtk_ui.py 2018-03-13 10:25:23 +0000
17+++ ubiquity/frontend/gtk_ui.py 2018-03-26 16:53:30 +0000
18@@ -874,6 +874,7 @@
19 misc.drop_privileges_save()
20 self.progress_mode.set_current_page(
21 self.progress_pages['progress_bar'])
22+ telemetry.get().add_stage('user_done')
23
24 if not self.slideshow:
25 self.page_mode.hide()
26
27=== modified file 'ubiquity/frontend/kde_ui.py'
28--- ubiquity/frontend/kde_ui.py 2018-03-13 10:25:23 +0000
29+++ ubiquity/frontend/kde_ui.py 2018-03-26 16:53:30 +0000
30@@ -607,6 +607,7 @@
31 return webView
32
33 def start_slideshow(self):
34+ telemetry.get().add_stage('user_done')
35 slideshow_dir = '/usr/share/ubiquity-slideshow'
36 slideshow_locale = self.slideshow_get_available_locale(slideshow_dir,
37 self.locale)
38
39=== modified file 'ubiquity/telemetry.py'
40--- ubiquity/telemetry.py 2018-03-13 10:25:23 +0000
41+++ ubiquity/telemetry.py 2018-03-26 16:53:30 +0000
42@@ -66,6 +66,11 @@
43 """Record anynomized partition method"""
44 self._metrics['PartitionMethod'] = method
45
46+ def _db_get_bool(self, value):
47+ if value == 'true':
48+ return True
49+ return False
50+
51 @raise_privileges
52 def done(self, db):
53 """Close telemetry collection
54@@ -74,10 +79,13 @@
55 destination file"""
56 self.add_stage('done')
57
58- self._metrics['DownloadUpdates'] = db.get('ubiquity/download_updates')
59+ self._metrics['DownloadUpdates'] = self._db_get_bool(
60+ db.get('ubiquity/download_updates'))
61 self._metrics['Language'] = db.get('localechooser/languagelist')
62- self._metrics['Minimal'] = db.get('ubiquity/minimal_install')
63- self._metrics['RestrictedAddons'] = db.get('ubiquity/use_nonfree')
64+ self._metrics['Minimal'] = self._db_get_bool(
65+ db.get('ubiquity/minimal_install'))
66+ self._metrics['RestrictedAddons'] = self._db_get_bool(
67+ db.get('ubiquity/use_nonfree'))
68 self._metrics['Stages'] = self._stages_hist
69
70 target_dir = os.path.dirname(self._dest_path)

Subscribers

People subscribed via source and target branches

to status/vote changes: