Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: packages/infra_libs/infra_libs/experiments.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Tools for gradually enabling a feature on a deterministic set of machines. 5 """Tools for gradually enabling a feature on a deterministic set of machines.
6 6
7 Add a flag to your program to control the percentage of machines that a new 7 Add a flag to your program to control the percentage of machines that a new
8 feature should be enabled on:: 8 feature should be enabled on::
9 9
10 def add_argparse_options(self, parser): 10 def add_argparse_options(self, parser):
(...skipping 25 matching lines...) Expand all
36 def is_active_for_host(experiment_name, percent): 36 def is_active_for_host(experiment_name, percent):
37 ret = _is_active({ 37 ret = _is_active({
38 'name': experiment_name, 38 'name': experiment_name,
39 'host': socket.getfqdn(), 39 'host': socket.getfqdn(),
40 }, percent) 40 }, percent)
41 41
42 if ret: 42 if ret:
43 logging.info('Experiment "%s" is active', experiment_name) 43 logging.info('Experiment "%s" is active', experiment_name)
44 44
45 return ret 45 return ret
OLDNEW
« no previous file with comments | « packages/infra_libs/infra_libs/event_mon/test/router_test.py ('k') | packages/infra_libs/infra_libs/httplib2_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698