Skip to content

Commit

Permalink
Randomly assign PORT for PGO.
Browse files Browse the repository at this point in the history
It appears a process on GHA Linux now uses 8888.
  • Loading branch information
MrAlex94 committed Sep 3, 2024
1 parent ba845c2 commit b850ba8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/pgo/profileserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import glob
import json
import os
import socket
import subprocess
import sys

Expand All @@ -19,7 +20,12 @@
from mozrunner import CLI, FirefoxRunner
from six import string_types

PORT = 8888
def find_free_port():
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('', 0))
return s.getsockname()[1]

PORT = find_free_port()

PATH_MAPPINGS = {
"/webkit/PerformanceTests": "third_party/webkit/PerformanceTests",
Expand Down

0 comments on commit b850ba8

Please sign in to comment.