Commit ac91857b authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

infra: s/50/5 % of tryjobs should be run on canary buildbucket template.

Rational: if bad canary is pushed, causing build failures, CQ would
false reject ~13% of CLs (and on retry, CL is highly likely to land).


How is 13% figure obtained? Monte-carlo simulation of 1M CLs!

    def simulate_cl(builders=31, canary=0.1, max_retry_total=3):
        """True means OK, False means CQ falsely rejects CL."""
        import random
        bad = sum(random.random() < canary for _ in xrange(builders))
        if bad > max_retry_total:
            return False
        still_fail = sum(random.random() < canary for _ in xrange(bad))
        return still_fail == 0

    def monte_carlo_cq_false_rejection_rate(times=10**6, **kwargs):
        fp = float(sum(simulate_cl(**kwargs) is False for _ in xrange(times)) * 100.0) / times
        return '%0.1f%% false rejection rate' % fp

    monte_carlo_cq_false_rejection_rate(builders=31, canary=0.01, max_retry_total=3)
    # '0.3% false rejection rate'

    monte_carlo_cq_false_rejection_rate(builders=31, canary=0.05, max_retry_total=3)
    # '12.8% false rejection rate'

    monte_carlo_cq_false_rejection_rate(builders=31, canary=0.10, max_retry_total=3)
    # '49.5% false rejection rate'

R=nodir@chromium.org

No-Try: True
Change-Id: I04bbdbb50bbeb0e9aea70fd5ca8aa89fd22d3fcf
Reviewed-on: https://chromium-review.googlesource.com/1045501Reviewed-by: default avatarNodir Turakulov <nodir@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557984}
parent d9cebd34
...@@ -1268,7 +1268,7 @@ buckets { ...@@ -1268,7 +1268,7 @@ buckets {
swarming { swarming {
hostname: "chromium-swarm.appspot.com" hostname: "chromium-swarm.appspot.com"
task_template_canary_percentage { value: 50 } task_template_canary_percentage { value: 5 }
builder_defaults { builder_defaults {
category: "Chromium CQ" category: "Chromium CQ"
......
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