mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 12:22:55 +00:00
* feat: add HTTP API to activate/deactivate heap profiling Signed-off-by: evenyag <realevenyag@gmail.com> * feat: add HTTP API to get profiling status Signed-off-by: evenyag <realevenyag@gmail.com> * feat: enable heap prof by default Signed-off-by: evenyag <realevenyag@gmail.com> * build: add "prof:true,prof_active:false" as default env to dockerfiles Signed-off-by: evenyag <realevenyag@gmail.com> * feat: activate heap profiling after log initialization Signed-off-by: evenyag <realevenyag@gmail.com> * feat: add memory options to control whether to activate profiling Signed-off-by: evenyag <realevenyag@gmail.com> * docs: update docs Signed-off-by: evenyag <realevenyag@gmail.com> * chore: fmt toml Signed-off-by: evenyag <realevenyag@gmail.com> * test: fix config test Signed-off-by: evenyag <realevenyag@gmail.com> * docs: usage of new api Signed-off-by: evenyag <realevenyag@gmail.com> * chore: log profile after version Signed-off-by: evenyag <realevenyag@gmail.com> * docs: update how to docs Signed-off-by: evenyag <realevenyag@gmail.com> * docs: fix how to docs Signed-off-by: evenyag <realevenyag@gmail.com> --------- Signed-off-by: evenyag <realevenyag@gmail.com>
53 lines
1.3 KiB
Docker
53 lines
1.3 KiB
Docker
FROM centos:7 as builder
|
|
|
|
ARG CARGO_PROFILE
|
|
ARG FEATURES
|
|
ARG OUTPUT_DIR
|
|
|
|
ENV LANG en_US.utf8
|
|
WORKDIR /greptimedb
|
|
|
|
# Install dependencies
|
|
RUN ulimit -n 1024000 && yum groupinstall -y 'Development Tools'
|
|
RUN yum install -y epel-release \
|
|
openssl \
|
|
openssl-devel \
|
|
centos-release-scl \
|
|
which
|
|
|
|
# Install protoc
|
|
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
|
|
RUN unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local/
|
|
|
|
# Install Rust
|
|
SHELL ["/bin/bash", "-c"]
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain none -y
|
|
ENV PATH /usr/local/bin:/root/.cargo/bin/:$PATH
|
|
|
|
# Build the project in release mode.
|
|
RUN --mount=target=.,rw \
|
|
--mount=type=cache,target=/root/.cargo/registry \
|
|
make build \
|
|
CARGO_PROFILE=${CARGO_PROFILE} \
|
|
FEATURES=${FEATURES} \
|
|
TARGET_DIR=/out/target
|
|
|
|
# Export the binary to the clean image.
|
|
FROM centos:7 as base
|
|
|
|
ARG OUTPUT_DIR
|
|
|
|
RUN yum install -y epel-release \
|
|
openssl \
|
|
openssl-devel \
|
|
centos-release-scl \
|
|
which
|
|
|
|
WORKDIR /greptime
|
|
COPY --from=builder /out/target/${OUTPUT_DIR}/greptime /greptime/bin/
|
|
ENV PATH /greptime/bin/:$PATH
|
|
|
|
ENV MALLOC_CONF="prof:true,prof_active:false"
|
|
|
|
ENTRYPOINT ["greptime"]
|