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

Unified Diff: telemetry/telemetry/util/bot_utils.py

Issue 2986013002: Revert of [Telemetry] Restore telemetry.util.bot_utils (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/util/bot_utils.py
diff --git a/telemetry/telemetry/util/bot_utils.py b/telemetry/telemetry/util/bot_utils.py
deleted file mode 100644
index 70955f5d3a4ab2e443df261d0c0c7d5ef9a2f7d2..0000000000000000000000000000000000000000
--- a/telemetry/telemetry/util/bot_utils.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Utility functions used to generate info used by the bots.
-
-TODO(eyaich): Remove once we no longer generate the list of benchmarks to
-run on the perf waterfall in telemetry.
-"""
-
-import hashlib
-
-def GetDeviceAffinity(num_shards, base_name):
- # Based on the current timings, we shift the result of the hash function to
- # achieve better load balancing. Those shift values are to be revised when
- # necessary. The shift value is calculated such that the total cycle time
- # is minimized.
- hash_shift = {
- 2 : 47, # for old desktop configurations with 2 slaves
- 5 : 56, # for new desktop configurations with 5 slaves
- 21 : 43 # for Android 3 slaves 7 devices configurations
- }
- shift = hash_shift.get(num_shards, 0)
- base_name_hash = hashlib.sha1(base_name).hexdigest()
- device_affinity = (int(base_name_hash, 16) >> shift) % num_shards
- return device_affinity
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698