Occasionally we introduce slowness (typically mongo queries) into the core logic of Allura, effecting every request. To find such cases I wrote a script [1] which uses the TimerMiddleware instrumentation we already have in place, to count "important" calls for a "typical" request. A typical request is a discussion thread with a few posts, and no tool-specific stuff.
Running it manually in verbose mode shows all the methods (mostly mongo queries) that execute, so it is very informative just to look at that and look for unnecessary queries. I found and removed several while working on this script. I have configured our Jenkins build to run the script for each build, and plot the results. You can go to https://builds.apache.org/job/Allura/plot/ and look for increases or decreases in call counts, as we make changes to Allura. There's also a wrapper script [2] which you can use locally to iterate over many git commits and generate a CSV with data for each commit. You can create a graph [3] with that CSV quite nicely. This script can be enhanced if we find it useful. For example, adding tool-specific URLs, instrumenting more methods, or checking mongo query params for unindexed fields. [1] https://forge-allura.apache.org/p/allura/git/ci/master/tree/scripts/perf/call_count.py [2] https://forge-allura.apache.org/p/allura/git/ci/master/tree/scripts/perf/call_count_walk_git.sh [3] https://docs.google.com/spreadsheet/ccc?key=0Arn0XGL_0rzsdG1nRkppVVlwUVJ1bFNzdVZjU1dJN3c&usp=sharing -- Dave Brondsema : [email protected] http://www.brondsema.net : personal http://www.splike.com : programming <><
