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 Aug 6, 2024
1 parent 49d5332 commit a41ec49
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 a41ec49

Please sign in to comment.