1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

* 'devel' of github.com:arangodb/arangodb:
  Upgrade instructions for perf tool.
  Add two more functions to perf analysis.
This commit is contained in:
Jan Christoph Uhde 2016-12-19 14:35:44 +01:00
commit 54c9c2be4a
2 changed files with 13 additions and 7 deletions

View File

@ -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 <algorithm>
#include <iostream>

View File

@ -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:*"
#
@ -65,6 +67,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