Commit e7c9fd75 authored by Garrett Beaty's avatar Garrett Beaty Committed by Chromium LUCI CQ

Account for CQ experiment percentage in goma usage.

Bug: 1145230
Change-Id: I4cbcff5d544802cca74675136eabc34aa541854f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566373
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: default avatarErik Staab <estaab@chromium.org>
Commit-Queue: Erik Staab <estaab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832072}
parent 4fea66bd
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# This is consumed by presubmit checks that need to validate the config # This is consumed by presubmit checks that need to validate the config
{ {
# 61150 (scheduler total) + 359500 (weighted CQ total) # 61150 (scheduler total) + 344990 (weighted CQ total)
# (weighted CQ total) = 7190 (CQ total) * 50 (CQ weight) # (weighted CQ total) = 6899.8 (CQ total) * 50 (CQ weight)
'*weighted total*': 420650, '*weighted total*': 406140,
'scheduler': { 'scheduler': {
'*total*': 61150, '*total*': 61150,
'triggered': { 'triggered': {
...@@ -534,7 +534,7 @@ ...@@ -534,7 +534,7 @@
}, },
}, },
'cq': { 'cq': {
'*total*': 7190, '*total*': 6899.8,
'try/android-binary-size': 150, 'try/android-binary-size': 150,
'try/android-cronet-arm-dbg': 80, 'try/android-cronet-arm-dbg': 80,
'try/android-lollipop-arm-rel': 150, 'try/android-lollipop-arm-rel': 150,
...@@ -569,23 +569,27 @@ ...@@ -569,23 +569,27 @@
'try/fuchsia_x64': 80, 'try/fuchsia_x64': 80,
# jobs count assumes an 8-core machine # jobs count assumes an 8-core machine
'try/ios-simulator': 80, 'try/ios-simulator': 80,
# 80 jobs x 3% experiment
# jobs count assumes an 8-core machine # jobs count assumes an 8-core machine
'try/ios-simulator-coverage-exp': 80, 'try/ios-simulator-coverage-exp': 2.4,
# jobs count assumes an 8-core machine # jobs count assumes an 8-core machine
'try/ios-simulator-cronet': 80, 'try/ios-simulator-cronet': 80,
# jobs count assumes an 8-core machine # jobs count assumes an 8-core machine
'try/ios-simulator-full-configs': 80, 'try/ios-simulator-full-configs': 80,
# 80 jobs x 3% experiment
# jobs count assumes an 8-core machine # jobs count assumes an 8-core machine
'try/ios-simulator-full-configs-coverage-exp': 80, 'try/ios-simulator-full-configs-coverage-exp': 2.4,
'try/linux-blink-rel': 80, 'try/linux-blink-rel': 80,
'try/linux-chromeos-compile-dbg': 80, 'try/linux-chromeos-compile-dbg': 80,
'try/linux-chromeos-rel': 150, 'try/linux-chromeos-rel': 150,
'try/linux-lacros-rel': 300, 'try/linux-lacros-rel': 300,
'try/linux-libfuzzer-asan-rel': 80, 'try/linux-libfuzzer-asan-rel': 80,
'try/linux-ozone-rel': 80, 'try/linux-ozone-rel': 80,
# 80 jobs x 100% experiment
'try/linux-perfetto-rel': 80, 'try/linux-perfetto-rel': 80,
'try/linux-rel': 150, 'try/linux-rel': 150,
'try/linux-rel-builderful': 150, # 150 jobs x 10% experiment
'try/linux-rel-builderful': 15,
'try/linux_chromium_asan_rel_ng': 150, 'try/linux_chromium_asan_rel_ng': 150,
'try/linux_chromium_compile_dbg_ng': 150, 'try/linux_chromium_compile_dbg_ng': 150,
'try/linux_chromium_dbg_ng': 80, 'try/linux_chromium_dbg_ng': 80,
......
...@@ -129,8 +129,19 @@ def _get_cq_goma_usage(ctx, goma_usage_by_builder): ...@@ -129,8 +129,19 @@ def _get_cq_goma_usage(ctx, goma_usage_by_builder):
if project != settings.project: if project != settings.project:
continue continue
goma_usage = goma_usage_by_builder[builder_id] goma_usage = goma_usage_by_builder[builder_id]
total_cq_goma_usage += goma_usage.jobs jobs = goma_usage.jobs
experiment_percentage = None
if builder.experiment_percentage:
experiment_percentage = builder.experiment_percentage
jobs = jobs * experiment_percentage * 0.01
goma_usage = struct(
jobs = jobs,
jobs_per_build = goma_usage.jobs,
experiment_percentage = experiment_percentage,
estimate = goma_usage.estimate,
)
cq_goma_usage_by_builder[builder_id] = goma_usage cq_goma_usage_by_builder[builder_id] = goma_usage
total_cq_goma_usage += jobs
return struct( return struct(
total = total_cq_goma_usage, total = total_cq_goma_usage,
...@@ -246,6 +257,11 @@ def _generate_goma_usage(ctx): ...@@ -246,6 +257,11 @@ def _generate_goma_usage(ctx):
"'*total*': {},".format(cq_goma_usage.total), "'*total*': {},".format(cq_goma_usage.total),
) )
for builder, goma_usage in sorted(cq_goma_usage.by_builder.items()): for builder, goma_usage in sorted(cq_goma_usage.by_builder.items()):
if goma_usage.experiment_percentage:
_("# {jobs} jobs x {percent}% experiment".format(
jobs = goma_usage.jobs_per_build,
percent = goma_usage.experiment_percentage,
))
if goma_usage.estimate: if goma_usage.estimate:
_("# jobs count assumes an 8-core machine") _("# jobs count assumes an 8-core machine")
_("'{}': {},".format(builder, goma_usage.jobs)) _("'{}': {},".format(builder, goma_usage.jobs))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment