mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
bug 1237610 - use a mach setting to control telemetry submission. r=gps
Differential Revision: https://phabricator.services.mozilla.com/D4597 --HG-- extra : rebase_source : 4ff227ab9792f84c0a839c43f6ef91f5786cef69
This commit is contained in:
parent
3028fb8bdb
commit
4da2469474
@ -190,7 +190,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
|
||||
|
||||
def telemetry_handler(context, data):
|
||||
# We have not opted-in to telemetry
|
||||
if 'BUILD_SYSTEM_TELEMETRY' not in os.environ:
|
||||
if not context.settings.build.telemetry:
|
||||
return
|
||||
|
||||
telemetry_dir = os.path.join(get_state_dir()[0], 'telemetry')
|
||||
@ -239,7 +239,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
|
||||
return
|
||||
|
||||
# We have not opted-in to telemetry
|
||||
if 'BUILD_SYSTEM_TELEMETRY' not in os.environ:
|
||||
if not context.settings.build.telemetry:
|
||||
return
|
||||
|
||||
# Every n-th operation
|
||||
|
@ -2842,3 +2842,12 @@ class Analyze(MachCommandBase):
|
||||
res = 'Please specify the location of cost_dict.gz with --path.'
|
||||
print ('Could not find cost_dict.gz at %s' % path, res, sep='\n')
|
||||
return 1
|
||||
|
||||
|
||||
@SettingsProvider
|
||||
class TelemetrySettings():
|
||||
config_settings = [
|
||||
('build.telemetry', 'boolean', """
|
||||
Enable submission of build system telemetry.
|
||||
""".strip(), False),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user