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
=== modified file 'autopilot/ubiquity_autopilot_tests/tests/__init__.py'
--- autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-03-22 15:11:13 +0000
+++ autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-03-26 16:53:30 +0000
@@ -239,7 +239,8 @@
239239
240 :param thirdParty: Boolean, if True selects install third-party240 :param thirdParty: Boolean, if True selects install third-party
241 software241 software
242 :param minimal_installation: Boolean, if True selects minimal installation option242 :param minimal_installation: Boolean, if True selects minimal
243 installation option
243244
244 :param networkConnection: Boolean if True checks the network state box245 :param networkConnection: Boolean if True checks the network state box
245 is visible and objects are correct, If246 is visible and objects are correct, If
246247
=== modified file 'ubiquity/frontend/gtk_ui.py'
--- ubiquity/frontend/gtk_ui.py 2018-03-13 10:25:23 +0000
+++ ubiquity/frontend/gtk_ui.py 2018-03-26 16:53:30 +0000
@@ -874,6 +874,7 @@
874 misc.drop_privileges_save()874 misc.drop_privileges_save()
875 self.progress_mode.set_current_page(875 self.progress_mode.set_current_page(
876 self.progress_pages['progress_bar'])876 self.progress_pages['progress_bar'])
877 telemetry.get().add_stage('user_done')
877878
878 if not self.slideshow:879 if not self.slideshow:
879 self.page_mode.hide()880 self.page_mode.hide()
880881
=== modified file 'ubiquity/frontend/kde_ui.py'
--- ubiquity/frontend/kde_ui.py 2018-03-13 10:25:23 +0000
+++ ubiquity/frontend/kde_ui.py 2018-03-26 16:53:30 +0000
@@ -607,6 +607,7 @@
607 return webView607 return webView
608608
609 def start_slideshow(self):609 def start_slideshow(self):
610 telemetry.get().add_stage('user_done')
610 slideshow_dir = '/usr/share/ubiquity-slideshow'611 slideshow_dir = '/usr/share/ubiquity-slideshow'
611 slideshow_locale = self.slideshow_get_available_locale(slideshow_dir,612 slideshow_locale = self.slideshow_get_available_locale(slideshow_dir,
612 self.locale)613 self.locale)
613614
=== modified file 'ubiquity/telemetry.py'
--- ubiquity/telemetry.py 2018-03-13 10:25:23 +0000
+++ ubiquity/telemetry.py 2018-03-26 16:53:30 +0000
@@ -66,6 +66,11 @@
66 """Record anynomized partition method"""66 """Record anynomized partition method"""
67 self._metrics['PartitionMethod'] = method67 self._metrics['PartitionMethod'] = method
6868
69 def _db_get_bool(self, value):
70 if value == 'true':
71 return True
72 return False
73
69 @raise_privileges74 @raise_privileges
70 def done(self, db):75 def done(self, db):
71 """Close telemetry collection76 """Close telemetry collection
@@ -74,10 +79,13 @@
74 destination file"""79 destination file"""
75 self.add_stage('done')80 self.add_stage('done')
7681
77 self._metrics['DownloadUpdates'] = db.get('ubiquity/download_updates')82 self._metrics['DownloadUpdates'] = self._db_get_bool(
83 db.get('ubiquity/download_updates'))
78 self._metrics['Language'] = db.get('localechooser/languagelist')84 self._metrics['Language'] = db.get('localechooser/languagelist')
79 self._metrics['Minimal'] = db.get('ubiquity/minimal_install')85 self._metrics['Minimal'] = self._db_get_bool(
80 self._metrics['RestrictedAddons'] = db.get('ubiquity/use_nonfree')86 db.get('ubiquity/minimal_install'))
87 self._metrics['RestrictedAddons'] = self._db_get_bool(
88 db.get('ubiquity/use_nonfree'))
81 self._metrics['Stages'] = self._stages_hist89 self._metrics['Stages'] = self._stages_hist
8290
83 target_dir = os.path.dirname(self._dest_path)91 target_dir = os.path.dirname(self._dest_path)

Subscribers

People subscribed via source and target branches

to status/vote changes: