@@ -15,6 +15,7 @@ DISCOVERY_UDP_PORT_NUM = 12000
1515RPC_PORT_NUM = 4000
1616HTTP_PORT_NUM = 3500
1717BEACON_MONITORING_PORT_NUM = 8080
18+ PROFILING_PORT_NUM = 6060
1819
1920# The min/max CPU/memory that the beacon node can use
2021BEACON_MIN_CPU = 100
@@ -235,13 +236,19 @@ def get_beacon_config(
235236 {constants .RPC_PORT_ID : public_ports_for_component [3 ]}
236237 )
237238 )
239+ public_ports .update (
240+ shared_utils .get_port_specs (
241+ {constants .PROFILING_PORT_ID : public_ports_for_component [4 ]}
242+ )
243+ )
238244
239245 used_port_assignments = {
240246 constants .TCP_DISCOVERY_PORT_ID : discovery_port ,
241247 constants .UDP_DISCOVERY_PORT_ID : discovery_port ,
242248 constants .HTTP_PORT_ID : HTTP_PORT_NUM ,
243249 constants .METRICS_PORT_ID : BEACON_MONITORING_PORT_NUM ,
244250 constants .RPC_PORT_ID : RPC_PORT_NUM ,
251+ constants .PROFILING_PORT_ID : PROFILING_PORT_NUM ,
245252 }
246253 used_ports = shared_utils .get_port_specs (used_port_assignments )
247254
@@ -266,8 +273,11 @@ def get_beacon_config(
266273 # vvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
267274 "--disable-monitoring=false" ,
268275 "--monitoring-host=0.0.0.0" ,
269- "--monitoring-port={0}" .format (BEACON_MONITORING_PORT_NUM )
270- # ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
276+ "--monitoring-port={0}" .format (BEACON_MONITORING_PORT_NUM ),
277+ # vvvvvvvvv PROFILING CONFIG vvvvvvvvvvvvvvvvvvvvv
278+ "--pprof" ,
279+ "--pprofaddr=0.0.0.0" ,
280+ "--pprofport={0}" .format (PROFILING_PORT_NUM ),
271281 ]
272282
273283 # If checkpoint sync is enabled, add the checkpoint sync url
0 commit comments