| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 const std::string kIgnoredSuffix = "_Dogfood"; | 84 const std::string kIgnoredSuffix = "_Dogfood"; |
| 85 if (group_name.rfind(kIgnoredSuffix) == | 85 if (group_name.rfind(kIgnoredSuffix) == |
| 86 group_name.length() - kIgnoredSuffix.length()) { | 86 group_name.length() - kIgnoredSuffix.length()) { |
| 87 group_name.resize(group_name.length() - kIgnoredSuffix.length()); | 87 group_name.resize(group_name.length() - kIgnoredSuffix.length()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 if (group_name.empty()) | 90 if (group_name.empty()) |
| 91 return ret; | 91 return ret; |
| 92 | 92 |
| 93 AlrExperimentSettings settings; | 93 AlrExperimentSettings settings; |
| 94 if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d", | 94 if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d,%d", |
| 95 &settings.pacing_factor, &settings.max_paced_queue_time, | 95 &settings.pacing_factor, &settings.max_paced_queue_time, |
| 96 &settings.alr_bandwidth_usage_percent, | 96 &settings.alr_bandwidth_usage_percent, |
| 97 &settings.alr_start_budget_level_percent, | 97 &settings.alr_start_budget_level_percent, |
| 98 &settings.alr_stop_budget_level_percent) == 5) { | 98 &settings.alr_stop_budget_level_percent, |
| 99 &settings.group_id) == 6) { |
| 99 ret.emplace(settings); | 100 ret.emplace(settings); |
| 100 LOG(LS_INFO) << "Using ALR experiment settings: " | 101 LOG(LS_INFO) << "Using ALR experiment settings: " |
| 101 "pacing factor: " | 102 "pacing factor: " |
| 102 << settings.pacing_factor << ", max pacer queue length: " | 103 << settings.pacing_factor << ", max pacer queue length: " |
| 103 << settings.max_paced_queue_time | 104 << settings.max_paced_queue_time |
| 104 << ", ALR start bandwidth usage percent: " | 105 << ", ALR start bandwidth usage percent: " |
| 105 << settings.alr_bandwidth_usage_percent | 106 << settings.alr_bandwidth_usage_percent |
| 106 << ", ALR end budget level percent: " | 107 << ", ALR end budget level percent: " |
| 107 << settings.alr_start_budget_level_percent | 108 << settings.alr_start_budget_level_percent |
| 108 << ", ALR end budget level percent: " | 109 << ", ALR end budget level percent: " |
| 109 << settings.alr_stop_budget_level_percent; | 110 << settings.alr_stop_budget_level_percent |
| 111 << ", ALR experiment group ID: " << settings.group_id; |
| 110 } else { | 112 } else { |
| 111 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name; | 113 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name; |
| 112 } | 114 } |
| 113 | 115 |
| 114 return ret; | 116 return ret; |
| 115 } | 117 } |
| 116 | 118 |
| 117 } // namespace webrtc | 119 } // namespace webrtc |
| OLD | NEW |