[Webkit-unassigned] [Bug 183888] Add a bisect button to automatically schedule bisecting A/B tasks.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 11 18:39:18 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=183888

--- Comment #18 from dewei_zhu at apple.com ---
Comment on attachment 337764
  --> https://bugs.webkit.org/attachment.cgi?id=337764
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=337764&action=review

> Websites/perf.webkit.org/public/v3/middle-commit-set-finder.js:49
> +        const repositoriesWithCommitTime = new Set;
> +        const commitRangeByRepository = new Map;
> +        const indexForCommitWithOnlyOrderByRepository = new Map;
> +        const fetchingPromises = [];
> +        const allCommitsWithCommitTime = [];
> +        for (const repository of oneCommitSet.topLevelRepositories()) {
> +            const oneCommit = oneCommitSet.commitForRepository(repository);
> +            const anotherCommit = anotherCommitSet.commitForRepository(repository);
> +            if (oneCommit === anotherCommit)
> +                continue;
> +
> +            if (oneCommit.hasCommitTime() && anotherCommit.hasCommitTime()) {
> +                const [startCommit, endCommit] = oneCommit.time() < anotherCommit.time() ? [oneCommit, anotherCommit] : [anotherCommit, oneCommit];
> +                commitRangeByRepository.set(repository, [startCommit, endCommit]);
> +                fetchingPromises.push(CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision()).then((commits) => {
> +                    allCommitsWithCommitTime.push(startCommit, ...commits)}));
> +                repositoriesWithCommitTime.add(repository);
> +                continue;
> +            }
> +
> +            fetchingPromises.push(Promise.all([CommitLog.fetchForSingleRevision(repository, oneCommit.revision()),
> +                CommitLog.fetchForSingleRevision(repository, anotherCommit.revision())]).then(() => {
> +                if (!oneCommit.hasCommitOrder() || !anotherCommit.hasCommitOrder())
> +                    return;
> +                const [startCommit, endCommit] = oneCommit.order() < anotherCommit.order() ? [oneCommit, anotherCommit] : [anotherCommit, oneCommit];
> +                commitRangeByRepository.set(repository, [startCommit, endCommit]);
> +                return CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision()).then((commits) => {
> +                    const indexByCommit = new Map;
> +                    commits = [startCommit, ...commits];
> +                    commits.forEach((commit, index) => indexByCommit.set(commit, index));
> +                    indexForCommitWithOnlyOrderByRepository.set(repository, indexByCommit);
> +                });
> +            }));
> +        }
> +        await Promise.all(fetchingPromises);

This does what in step 1 describes.

> Websites/perf.webkit.org/public/v3/middle-commit-set-finder.js:54
> +        let sortedCommitSets = MiddleCommitSetFinder._filterSortAndUniqueCommitSets(oneCommitSet, availableCommitSets, commitRangeByRepository, repositoriesWithCommitTime, [...indexForCommitWithOnlyOrderByRepository.keys()]);

This does what in step 2 describes.

> Websites/perf.webkit.org/public/v3/middle-commit-set-finder.js:62
> +        let remainingCommitSets = MiddleCommitSetFinder._findCommitSetsClosestToMiddleOfCommitsWithTime(sortedCommitSets.slice(1, -1), repositoriesWithCommitTime, allCommitsWithCommitTime);

This does what in step 3 describes.

> Websites/perf.webkit.org/public/v3/middle-commit-set-finder.js:63
> +        remainingCommitSets = MiddleCommitSetFinder._findCommitSetsClosestToMiddleOfCommitsWithOrder(remainingCommitSets, indexForCommitWithOnlyOrderByRepository);

This does what in step 4 describes.

> Websites/perf.webkit.org/public/v3/middle-commit-set-finder.js:64
> +        return MiddleCommitSetFinder._chooseCommitSetClosestToMiddleOfSortedCommitSetsAmongRemainingCommitSets(remainingCommitSets, sortedCommitSets);

This does what step 5 describes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180412/971e6258/attachment-0002.html>


More information about the webkit-unassigned mailing list