[webkit-changes] [WebKit/WebKit] 03d936: [webkitcorepy] Add mutually exclusive groups to Ta...

Jonathan Bedard noreply at github.com
Tue May 14 17:18:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 03d9366f146b13e52b370ee15d905a7da16b6c01
      https://github.com/WebKit/WebKit/commit/03d9366f146b13e52b370ee15d905a7da16b6c01
  Author: Jonathan Bedard <jbedard at apple.com>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py
    M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py

  Log Message:
  -----------
  [webkitcorepy] Add mutually exclusive groups to TaskPool
https://bugs.webkit.org/show_bug.cgi?id=273695
rdar://127503729

Reviewed by Sam Sneddon.

Add the concept of mutually exclusive groups to TaskPool, which will
allow for types of tests to be grouped in a single processes with other
tests of their own type.

* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(_State.__init__): Include mutually exclusive groups supported by worker.
(_State.__call__): Print names of mutually exclusive groups supported by worker.
(_Queue): Added.
(_Process.main): Attempt to fetch tasks from any groups registered to this worker
before fetching tasks from the shared queue.
(TaskPool.__init__): Allow caller to define mutually exclusive groups.
(TaskPool.__enter__): Distribute mutually exclusive groups amongst workers, with each
worker taking ownership over an equal number of groups.
(TaskPool.do): Allow caller to specify a group send task to.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(action): Add option to log which worker a task was run on.
(TaskPoolUnittest.test_mutually_exclusive_group):
(TaskPoolUnittest.test_mutually_exclusive_groups):
(TaskPoolUnittest.test_invalid_group):

Canonical link: https://commits.webkit.org/278787@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list