Skip to content

Commit b9bd7cc

Browse files
committed
fix(docker): Fix base image for profiling
1 parent f91119e commit b9bd7cc

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

contrib/base/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,15 @@ FROM debian:bookworm-slim
22

33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
openssl ca-certificates protobuf-compiler postgresql-client curl \
5-
jq git \
5+
jq git linux-perf \
6+
strace valgrind procps \
7+
bpftrace linux-headers-generic \
68
&& rm -rf /var/lib/apt/lists/*
9+
10+
11+
# Clone FlameGraph repository
12+
RUN git clone https://github.com/brendangregg/FlameGraph.git /opt/FlameGraph && \
13+
chmod +x /opt/FlameGraph/*.pl
14+
15+
# Create profiling directory with proper permissions
16+
RUN mkdir -p /opt/profiling && chmod 777 /opt/profiling

contrib/indexer-service/Dockerfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,9 @@ RUN cargo build --release --bin indexer-service-rs
1414
FROM debian:bookworm-slim
1515
RUN apt-get update && apt-get install -y --no-install-recommends \
1616
openssl ca-certificates protobuf-compiler postgresql-client curl \
17-
jq git linux-perf \
18-
strace valgrind procps \
19-
bpftrace linux-headers-generic \
17+
jq \
2018
&& rm -rf /var/lib/apt/lists/*
2119

22-
# Clone FlameGraph repository
23-
RUN git clone https://github.com/brendangregg/FlameGraph.git /opt/FlameGraph && \
24-
chmod +x /opt/FlameGraph/*.pl
25-
26-
# Create profiling directory with proper permissions
27-
RUN mkdir -p /opt/profiling && chmod 777 /opt/profiling
2820

2921
COPY --from=build /root/target/release/indexer-service-rs /usr/local/bin/indexer-service-rs
3022

contrib/tap-agent/Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@ FROM debian:bookworm-slim
1616

1717
RUN apt-get update && apt-get install -y --no-install-recommends \
1818
openssl ca-certificates postgresql-client curl jq iproute2 \
19-
git linux-perf \
20-
strace valgrind procps \
21-
bpftrace linux-headers-generic \
2219
&& rm -rf /var/lib/apt/lists/*
2320

24-
25-
# Clone FlameGraph repository
26-
RUN git clone https://github.com/brendangregg/FlameGraph.git /opt/FlameGraph && \
27-
chmod +x /opt/FlameGraph/*.pl
28-
2921
# Create profiling directory with proper permissions
3022
RUN mkdir -p /opt/profiling && chmod 777 /opt/profiling
3123

contrib/tap-agent/start-perf.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ valgrind)
142142
--threshold=0.5 \
143143
/usr/local/bin/indexer-tap-agent --config /opt/config.toml
144144
;;
145-
# Use sudo callgrind_annotate indexer-service.callgrind.out
146-
# for humand friendly report of callgrind output
145+
# Use callgrind_annotate indexer-service.callgrind.out
146+
# or KcacheGrind viewer
147+
# for humand friendly report
147148
# Ideally you should set:
148149
# [profile.release.package."*"]
149150
# debug = true
@@ -155,6 +156,13 @@ callgrind)
155156
--callgrind-out-file=/opt/profiling/tap-agent/callgrind.out \
156157
--cache-sim=yes \
157158
--branch-sim=yes \
159+
--collect-jumps=yes \
160+
--collect-systime=yes \
161+
--collect-bus=yes \
162+
--separate-threads=yes \
163+
--dump-instr=yes \
164+
--dump-line=yes \
165+
--compress-strings=no \
158166
/usr/local/bin/indexer-tap-agent --config /opt/config.toml
159167
;;
160168
none)

0 commit comments

Comments
 (0)