diff --git a/scripts/linux_performance_setup.sh b/scripts/linux_performance_setup.sh index 359feee0..7c11cbbd 100755 --- a/scripts/linux_performance_setup.sh +++ b/scripts/linux_performance_setup.sh @@ -13,7 +13,7 @@ ## ##===----------------------------------------------------------------------===## -# docker run --privileged -it -v `pwd`:/code -w /code swiftlang/swift:nightly-5.2-bionic bash +# docker run --privileged -it -v `pwd`:/code -w /code swiftlang/swift:nightly-5.3-bionic bash apt-get update -y apt-get install -y vim htop strace linux-tools-common linux-tools-generic libc6-dbg @@ -22,7 +22,7 @@ echo 0 > /proc/sys/kernel/kptr_restrict cd /usr/bin rm -rf perf -ln -s /usr/lib/linux-tools/4.15.0-91-generic/perf perf +ln -s /usr/lib/linux-tools/*/perf perf cd - cd /opt @@ -36,11 +36,11 @@ cd - # (.build/release/MockServer) & # # strace -# export MAX_REQUESTS=10000 +# export MAX_REQUESTS=10000 (or MAX_REQUESTS=1 for cold start analysis) # strace -o .build/strace-c-string-$MAX_REQUESTS -c .build/release/StringSample # strace -o .build/strace-ffftt-string-$MAX_REQUESTS -fftt .build/release/StringSample # # perf -# export MAX_REQUESTS=10000 +# export MAX_REQUESTS=10000 (or MAX_REQUESTS=1 for cold start analysis) # perf record -o .build/perf-$MAX_REQUESTS.data -g -F 100000 .build/release/StringSample dwarf # perf script -i .build/perf-$MAX_REQUESTS.data | /opt/FlameGraph/stackcollapse-perf.pl | swift-demangle | /opt/FlameGraph/flamegraph.pl > .build/flamegraph-$MAX_REQUESTS.svg