mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(bash): Improved support for gperftools (#5769)
This commit is contained in:
@@ -28,7 +28,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# since it's not cacheable by docker
|
||||
RUN apt-get update && apt-get install -y gdb gdbserver git dos2unix lsb-core sudo curl unzip \
|
||||
make cmake clang libmysqlclient-dev libace-dev \
|
||||
build-essential libtool cmake-data openssl libgoogle-perftools-dev \
|
||||
build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \
|
||||
libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \
|
||||
libncurses5-dev ccache \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -106,7 +106,8 @@ RUN addgroup --gid $GROUP_ID acore && \
|
||||
echo 'acore ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# install the required dependencies to run the server
|
||||
RUN apt-get update && apt-get install -y dos2unix gdb gdbserver net-tools tzdata libmysqlclient-dev libace-dev mysql-client curl unzip && rm -rf /var/lib/apt/lists/* ;
|
||||
RUN apt-get update && apt-get install -y dos2unix gdb gdbserver google-perftools libgoogle-perftools-dev net-tools \
|
||||
tzdata libmysqlclient-dev libace-dev mysql-client curl unzip && rm -rf /var/lib/apt/lists/* ;
|
||||
|
||||
# change timezone in container
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
|
||||
|
||||
@@ -108,7 +108,10 @@ shellCommandFactory(
|
||||
shellCommandFactory(
|
||||
"dev:shell [args...]",
|
||||
"Open an interactive shell within the dev server",
|
||||
["docker-compose run --rm ac-dev-server bash"],
|
||||
[
|
||||
"docker-compose up -d ac-dev-server",
|
||||
"docker-compose exec ac-dev-server bash",
|
||||
],
|
||||
env,
|
||||
);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ UBUNTU_VERSION=$(lsb_release -sr);
|
||||
sudo apt-get update -y
|
||||
|
||||
# shared deps
|
||||
sudo apt-get -y install make cmake clang curl unzip libmysqlclient-dev libace-dev ccache
|
||||
sudo apt-get -y install make cmake clang curl unzip libmysqlclient-dev libace-dev ccache google-perftools
|
||||
|
||||
if [[ $CONTINUOUS_INTEGRATION || $DOCKER ]]; then
|
||||
sudo apt-get -y install build-essential libtool cmake-data openssl libgoogle-perftools-dev \
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source "$CUR_PATH/../apps/startup-scripts/simple-restarter"
|
||||
41
conf/dist/config.sh
vendored
41
conf/dist/config.sh
vendored
@@ -88,6 +88,47 @@ CCUSTOMOPTIONS=${CCUSTOMOPTIONS:-''}
|
||||
AC_CCACHE=${AC_CCACHE:-false}
|
||||
export CCACHE_DIR=${CCACHE_DIR:-"$AC_PATH_VAR/ccache"}
|
||||
|
||||
##############################################
|
||||
#
|
||||
# GOOGLE PERF TOOLS
|
||||
#
|
||||
# Repository: https://github.com/gperftools/gperftools#readme
|
||||
# Documentation: https://gperftools.github.io/gperftools/
|
||||
#
|
||||
# Install (Ubuntu):
|
||||
# sudo apt-get install google-perftools libgoogle-perftools-dev
|
||||
# Note: dependencies above are already installed in docker
|
||||
#
|
||||
# Usage:
|
||||
# 1. To enable the gperftools you need to compile with the -DWITH_PERFTOOLS=ON compiler flag. You can use CCUSTOMOPTIONS above to set it for the dashboard compiler
|
||||
# 2. Configure the variable below accordingly to your needs
|
||||
# 3. run the worldserver with the "./acore.sh run-worldserver"
|
||||
# 4. run "killall -12 worldserver" This command will start the monitoring process. Run "killall -12 worldserver" again to stop the process when you want
|
||||
# 5. At this time you will have the .prof file ready in the folder configured below.
|
||||
# Run "google-pprof --callgrind <path/of/worldserver/bin> </path/of/prof/file>" This will generate a callgrind file that can be read with
|
||||
# QCacheGrind, KCacheGrind and any other compatible tools
|
||||
#
|
||||
##############################################
|
||||
|
||||
# files used by gperftools to store monitored information
|
||||
export CPUPROFILE=${CPUPROFILE:-"$BINPATH/logs/worldserver-cpu.prof"}
|
||||
# heap profile is disabled by default. Uncomment this line to enable it
|
||||
# export HEAPPROFILE=${HEAPPROFILE:-"$BINPATH/logs/worldserver-heap.prof"}
|
||||
|
||||
# signal to send to the kill command to start/stop the profiling process. kill -12
|
||||
export CPUPROFILESIGNAL=${CPUPROFILESIGNAL:-12}
|
||||
|
||||
# How many interrupts/second the cpu-profiler samples.
|
||||
#export CPUPROFILE_FREQUENCY=${CPUPROFILESIGNAL:-100}
|
||||
|
||||
# If set to any value (including 0 or the empty string), use ITIMER_REAL instead of ITIMER_PROF to gather profiles.
|
||||
# In general, ITIMER_REAL is not as accurate as ITIMER_PROF, and also interacts badly with use of alarm(),
|
||||
# so prefer ITIMER_PROF unless you have a reason prefer ITIMER_REAL.
|
||||
#export CPUPROFILE_REALTIME=${CPUPROFILE_REALTIME}
|
||||
|
||||
# Other values for HEAPCHECK: minimal, normal (equivalent to "1"), strict, draconian
|
||||
#export HEAPCHECK=${HEAPCHECK:-normal}
|
||||
|
||||
|
||||
##############################################
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user