From 271daafdbea341e8afb71d337742e1f89c3abc9f Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Mon, 19 Dec 2016 13:04:27 +0100 Subject: [PATCH 1/2] Add two more functions to perf analysis. --- scripts/setupPerfEvents.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/setupPerfEvents.sh b/scripts/setupPerfEvents.sh index 36af7a012f..f85971adc4 100755 --- a/scripts/setupPerfEvents.sh +++ b/scripts/setupPerfEvents.sh @@ -65,6 +65,10 @@ main(){ addEvent handleRequest handleRequest@HttpServer.cpp addEvent handleWrite handleWrite@SocketTask.cpp + echo "work in LogicalCollection" + addEvent logicalInsertDocument insertDocument@LogicalCollection.cpp + addEvent logicalInsert insert@LogicalCollection.cpp + addEvent tcp_sendmsg addEvent tcp_recvmsg From c4a99800cd874534761313db7923f23bf610b806 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Mon, 19 Dec 2016 13:07:21 +0100 Subject: [PATCH 2/2] Upgrade instructions for perf tool. --- scripts/perfanalysis.cpp | 2 +- scripts/setupPerfEvents.sh | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/perfanalysis.cpp b/scripts/perfanalysis.cpp index 01a635b561..535a43dcb2 100644 --- a/scripts/perfanalysis.cpp +++ b/scripts/perfanalysis.cpp @@ -1,5 +1,5 @@ // Compile with -// g++ perfanalysis.cpp -o perfanalyis -std=c++11 -Wall -O3 +// g++ perfanalysis.cpp -o perfanalyis -std=c++14 -Wall -O3 #include #include diff --git a/scripts/setupPerfEvents.sh b/scripts/setupPerfEvents.sh index f85971adc4..75eb924f8d 100755 --- a/scripts/setupPerfEvents.sh +++ b/scripts/setupPerfEvents.sh @@ -8,24 +8,26 @@ # document operations. Run this script with sudo when the ArangoDB # process is already running: # -# ./setupPerfEvents.sh +# sudo ./setupPerfEvents.sh # # Now you are able to recrod the event with: # -# sudo perf record -e "probe_arangod:*" -aR sleep 60 +# sudo perf record -e "probe_arangod:*" -aR # -# The above command will get sample data for 60 seconds. A file "perf.data" is -# written to the current directory. Dump the events in this file with: +# The above command will get sample data indefinitely, hit Ctrl-C when +# the measurement is finished. A file "perf.data" is written to the +# current directory. Dump the events in this file with: # # sudo perf script > perf.history # # This logs the times when individual threads hit the events. # Use the program perfanalyis.cpp in this directory in the following way: +# (for compilation instructions see at the top of perfanalysis.cpp) # -# sudo ./perfanalyis < perf.history > perf.statistics +# ./scripts/perfanalyis < perf.history > perf.statistics # # This will group enter and exit events of functions together, compute the time -# spent and sort by function. When finised remove all events with: +# spent and sort by function. When finished remove all events with: # # sudo perf probe -d "probe_arangod:*" #