Skip to content

Commit 5fd234a

Browse files
authored
Merge pull request ClickHouse#79002 from ClickHouse/ci_enable_profiling_in_perf_tests
CI: Enable profiling in perf tests
2 parents 9ad7366 + 97c010e commit 5fd234a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ci/jobs/performance_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def run_test(
162162
f"./tests/performance/scripts/perf.py --host localhost localhost \
163163
--port {cls.LEFT_SERVER_PORT} {cls.RIGHT_SERVER_PORT} \
164164
--runs {runs} --max-queries {max_queries} \
165-
--profile-seconds 0 \
165+
--profile-seconds 10 \
166166
{test_file}",
167167
verbose=True,
168168
)
@@ -621,7 +621,7 @@ def too_many_slow(msg):
621621
# attach all logs with errors
622622
Shell.check(f"rm -f {perf_wd}/logs.tar.zst")
623623
Shell.check(
624-
f'cd {perf_wd} && find . -type f \( -name "*.log" -o -name "*.tsv" -o -name "*.txt" -o -name "*.rep" \) ! -path "*/db/*" ! -path "*/db0/*" -print0 | tar --null -T - -cf - | zstd -o ./logs.tar.zst',
624+
f'cd {perf_wd} && find . -type f \( -name "*.log" -o -name "*.tsv" -o -name "*.txt" -o -name "*.rep" -o -name "*.svg" \) ! -path "*/db/*" ! -path "*/db0/*" -print0 | tar --null -T - -cf - | zstd -o ./logs.tar.zst',
625625
verbose=True,
626626
)
627627
if Path(f"{perf_wd}/logs.tar.zst").is_file():

ci/jobs/scripts/perf/compare.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ do
11041104
| cut -f 5- \
11051105
| sed 's/\t/ /g' \
11061106
| tee "report/tmp/$query_file.stacks.$version.tsv" \
1107-
| ~/fg/flamegraph.pl --hash > "$query_file.$version.svg" &
1107+
| /fg/flamegraph.pl --hash > "$query_file.$version.svg" &
11081108
done
11091109
done
11101110
wait
@@ -1113,10 +1113,10 @@ unset IFS
11131113
# Create differential flamegraphs.
11141114
while IFS= read -r query_file
11151115
do
1116-
~/fg/difffolded.pl "report/tmp/$query_file.stacks.left.tsv" \
1116+
/fg/difffolded.pl "report/tmp/$query_file.stacks.left.tsv" \
11171117
"report/tmp/$query_file.stacks.right.tsv" \
11181118
| tee "report/tmp/$query_file.stacks.diff.tsv" \
1119-
| ~/fg/flamegraph.pl > "$query_file.diff.svg" &
1119+
| /fg/flamegraph.pl > "$query_file.diff.svg" &
11201120
done < report/query-files.txt
11211121
wait
11221122

docker/test/performance-comparison/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ RUN apt-get update \
3939
COPY requirements.txt /
4040
RUN pip3 --no-cache-dir install -r requirements.txt
4141

42+
RUN mkdir /fg && cd /fg \
43+
&& wget -nv -nd -c "https://raw.githubusercontent.com/brendangregg/FlameGraph/cd9ee4c4449775a2f867acf31c84b7fe4b132ad5/flamegraph.pl" \
44+
&& wget -nv -nd -c "https://raw.githubusercontent.com/brendangregg/FlameGraph/cd9ee4c4449775a2f867acf31c84b7fe4b132ad5/difffolded.pl" \
45+
&& chmod +x /fg/difffolded.pl \
46+
&& chmod +x /fg/flamegraph.pl
47+
4248
COPY run.sh /
4349

4450
COPY --from=clickhouse/cctools:13cfebfd8f1bbc65ab49 /opt/gdb /opt/gdb

0 commit comments

Comments
 (0)