Wiki source code of Profiling
Last modified by Ecaterina Moraru (Valica) on 2017/09/04 14:42
Hide last authors
author | version | line-number | content |
---|---|---|---|
4.4 | 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | |
2 | {{toc/}} | ||
3 | {{/box}} | ||
4 | |||
1.1 | 5 | Profiling is useful to find out performance bottlenecks and find out memory hogs. There are 2 types of tools that can be easily used to profile XWiki. | |
6 | |||
3.1 | 7 | = Profiling using a Profiler = | |
1.1 | 8 | ||
6.2 | 9 | The best tool for the job is of course a [[profiler>>http://en.wikipedia.org/wiki/Profiling_(computer_programming)]]. Follow the steps: | |
1.1 | 10 | ||
7.1 | 11 | * Get a [[profiler>>http://en.wikipedia.org/wiki/Profiling_(computer_programming)]]((( | |
2.1 | 12 | {{info}} | |
6.2 | 13 | For XWiki committers, we have free YourKit licenses for developing on XWiki. | |
2.1 | 14 | {{/info}} | |
4.2 | 15 | ))) | |
6.2 | 16 | * [[Build XWiki>>Building]] or simply download a XWiki binary release | |
4.1 | 17 | * Check your profiler's documentation to see the command line that needs to be added when starting the XWiki JVM. | |
7.1 | 18 | * If you're using YourKit you can start XWiki with the following command line: ##start_xwiki_debug.sh 8080 profiler /path/where/agent/is## (for example: ##start_xwiki_debug.sh 8080 profiler "/Applications/YourKit Java Profiler 7.0.11.app/bin/mac"##) | |
4.1 | 19 | * Run the Profiler and then start XWiki | |
1.1 | 20 | ||
5.1 | 21 | = Profiling using Byteman = | |
1.1 | 22 | ||
6.1 | 23 | See [[Byteman>>http://www.jboss.org/byteman]] and the [[XWiki Byteman tutorial>>Debugging#HUsingByteman]]. |