Squashed 'external/toxcore/c-toxcore/' content from commit 67badf69
git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 67badf69416a74e74f6d7eb51dd96f37282b8455
This commit is contained in:
23
other/docker/perf/entrypoint.sh
Executable file
23
other/docker/perf/entrypoint.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
TEST=${1:-conference_test}
|
||||
OUTPUT="/work/c-toxcore/test.perf"
|
||||
|
||||
readarray -t FLAGS <<<"$(pkg-config --cflags --libs libsodium opus vpx | sed -e 's/ /\n/g')"
|
||||
readarray -t SRCS <<<"$(find /work/c-toxcore/tox* -name "*.c")"
|
||||
|
||||
gcc -pthread -g \
|
||||
-o "/work/$TEST" -O3 -fno-omit-frame-pointer \
|
||||
"${SRCS[@]}" \
|
||||
/work/c-toxcore/auto_tests/auto_test_support.c \
|
||||
/work/c-toxcore/testing/misc_tools.c \
|
||||
"/work/c-toxcore/auto_tests/$TEST.c" \
|
||||
-DMIN_LOGGER_LEVEL=LOGGER_LEVEL_TRACE \
|
||||
"${FLAGS[@]}"
|
||||
|
||||
time perf record -g --call-graph dwarf --freq=max "/work/$TEST" /work/c-toxcore/auto_tests/
|
||||
perf report | head -n50
|
||||
perf script -F +pid >"$OUTPUT"
|
||||
chown 1000:100 "$OUTPUT"
|
Reference in New Issue
Block a user