1
0
mirror of https://github.com/google/nomulus synced 2026-02-13 08:11:36 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Juan Celhay
4aadcf818a Run profiler in fronted/cosole containers only (#2951) 2026-02-09 04:15:00 +00:00

View File

@@ -21,8 +21,13 @@ cd webapps
find . -maxdepth 1 -type d -name "console-*" -exec rm -rf {} +
cd /jetty-base
echo "Running ${env}"
# Use the CONTAINER_NAME variable from Kubernetes YAML to set the profiler service name.
java -agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=${CONTAINER_NAME},-cprof_enable_heap_sampling=true \
PROFILER_ARGS=""
# # Use the CONTAINER_NAME variable from Kubernetes YAML to set Cloud profiler args, enable it only in frontend and console.
case "${CONTAINER_NAME}" in
"frontend"|"console")
PROFILER_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=${CONTAINER_NAME},-cprof_enable_heap_sampling=true"
esac
java $PROFILER_ARGS \
-Dgoogle.registry.environment=${env} \
-Djava.util.logging.config.file=/logging.properties \
-jar /usr/local/jetty/start.jar