⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278638 in webkit


Ignore:
Timestamp:
Jun 8, 2021, 6:12:12 PM (5 years ago)
Author:
Dewei Zhu
Message:

Increase http server launch timeout on run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=226801

Reviewed by Ryosuke Niwa.

Installing twisted module in http server may take longer than 7.5 seconds.
Increase the timeout to be 31.5 seconds and add an early terminate if http server
process is not running.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:

Removed unused import.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

(SimpleHTTPServerDriver.serve):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r278624 r278638  
     12021-06-08  Dewei Zhu  <dewei_zhu@apple.com>
     2
     3        Increase http server launch timeout on run-benchmark script.
     4        https://bugs.webkit.org/show_bug.cgi?id=226801
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Installing twisted module in http server may take longer than 7.5 seconds.
     9        Increase the timeout to be 31.5 seconds and add an early terminate if http server
     10        process is not running.
     11
     12        * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
     13        Removed unused import.
     14        * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
     15        (SimpleHTTPServerDriver.serve):
     16
    1172021-06-08  Fujii Hironori  <Hironori.Fujii@sony.com>
    218
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py

    r275152 r278638  
    1212    sys.path.insert(0, script_dir)
    1313
    14 from pkg_resources import require, VersionConflict, DistributionNotFound
    1514from webkitpy.autoinstalled import twisted
    1615
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py

    r277490 r278638  
    3434        self._server_port = 0
    3535        self._server_process = subprocess.Popen(["python", http_server_path, web_root] + interface_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    36         max_attempt = 5
     36        max_attempt = 7
     37        retry_sequence = map(lambda attempt: attempt != max_attempt - 1, range(max_attempt))
    3738        interval = 0.5
    3839        _log.info('Start to fetching the port number of the http server')
    39         for attempt in range(max_attempt):
     40        for retry in retry_sequence:
    4041            self._find_http_server_port()
    4142            if self._server_port:
    4243                _log.info('HTTP Server is serving at port: %d', self._server_port)
    4344                break
    44             _log.info('Server port is not found this time, retry after %f seconds' % interval)
     45            assert self._server_process.poll() is None, 'HTTP Server Process is not running'
     46            if not retry:
     47                continue
     48            _log.info('Server port is not found this time, retry after {} seconds'.format(interval))
    4549            time.sleep(interval)
    4650            interval *= 2
Note: See TracChangeset for help on using the changeset viewer.