diff --git a/.vscode/launch.json b/.vscode/launch.json index 33031a5b..08817272 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,31 +1,27 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceRoot}/build/src/renderd", + "args": ["-f", "-c", "/etc/renderd.conf"], + "stopAtEntry": false, + "cwd": "${fileDirname}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ { - "name": "(gdb) Launch", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/build/src/renderd", - "args": [ - "-f", - "-c", - "/etc/renderd.conf" - ], - "stopAtEntry": false, - "cwd": "${fileDirname}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/measure_rss_anon.sh b/measure_rss_anon.sh index 062f01bc..4b35b359 100755 --- a/measure_rss_anon.sh +++ b/measure_rss_anon.sh @@ -12,35 +12,38 @@ function runtest() { mkdir -p $BUILD echo "Configuring..." - cmake -B $BUILD -DMALLOC_LIB=$1 . + cmake -B $BUILD -DMALLOC_LIB=$1 -DENABLE_TESTS:BOOLEAN=ON . echo "Building..." cmake --build $BUILD # Store the results in this file - JSON=rssanon-$1.json5 + JSON=rssanon-$1.js echo "Libraries:" - ldd ./$BUILD/src/renderd | grep 'glib\|alloc' + ldd ./$BUILD/src/renderd | grep 'libc\.\|alloc' + + mkdir -p ./$BUILD/tests/run/file ./$BUILD/tests/tiles/file echo "Starting renderd..." - ./$BUILD/src/renderd -f -c /etc/renderd.conf & + ./$BUILD/src/renderd --config=$BUILD/tests/conf/file/renderd.conf --foreground & + RENDERD_PID=$! SECONDS=0 printf 'const %s = [\n' $1 >$JSON while [ $SECONDS -lt 30 ] do - RSS=$(grep RssAnon /proc/$(pidof renderd)/status | awk '{print $2}') + RSS=$(grep RssAnon /proc/$RENDERD_PID/status | awk '{print $2}') printf '{ "t": %d, "tag": "%s", "rss": %d },\n' $SECONDS $1 $RSS >>$JSON printf 'Time:%d Mem:%d\n' $SECONDS $RSS sleep 1 done echo "Issuing render request..." - ./$BUILD/src/render_list -c /etc/renderd.conf -n 8 --all --force --map=retina -z 6 -Z 6 & + ./$BUILD/src/render_list --all --config=$BUILD/tests/conf/file/renderd.conf --force --map=webp --max-load=$(($(nproc) * 2)) --max-zoom=10 & while [ $SECONDS -lt 300 ] do - RSS=$(grep RssAnon /proc/$(pidof renderd)/status | awk '{print $2}') + RSS=$(grep RssAnon /proc/$RENDERD_PID/status | awk '{print $2}') printf '{ "t": %d, "tag": "%s", "rss": %d },\n' $SECONDS $1 $RSS >>$JSON printf 'Time:%d Mem:%d\n' $SECONDS $RSS sleep 1 @@ -48,19 +51,21 @@ function runtest() { printf '{"t": %d, "tag": "%s", "rss": %d }];\n' $SECONDS $1 $RSS >>$JSON echo "Measurement completed. Results are here: $JSON. PID of renderd is: `pidof renderd`" - ./$BUILD/src/render_list -c /etc/renderd.conf -S - #kill $(pidof renderd) + ./$BUILD/src/render_list --config=$BUILD/tests/conf/file/renderd.conf --stop + #kill $RENDERD_PID } function compare_malloc() { - runtest glib - sleep 10 runtest jemalloc sleep 10 + runtest libc + sleep 10 + runtest mimalloc + sleep 10 runtest tcmalloc echo "Comparison completed." } -# compare_malloc +compare_malloc -runtest jemalloc +# runtest jemalloc diff --git a/rss_anon.html b/rss_anon.html index 49507355..a620b168 100644 --- a/rss_anon.html +++ b/rss_anon.html @@ -1,65 +1,70 @@ +
+