Merge branch 'bug/JAL-3760_protsTreatedAsNucleotides' into releases/Release_2_11_1_Branch
[jalview.git] / benchmarking / README
1 To set up benchmarking:
2
3 You will need to install Maven: https://maven.apache.org/install.html
4
5 1. Run the makedist target of build.xml in Eclipse, or in the jalview directory run 
6   ant makedist
7
8 This builds a jalview.jar file and puts it into dist/
9
10
11 2. Make a lib directory in benchmarking/ if not already present and cd into this directory.
12
13
14 3. Purge any previous maven dependencies:
15    mvn dependency:purge-local-repository -DactTransitively=false -DreResolve=false
16
17
18 4. Run
19   mvn install:install-file -Dfile=../dist/jalview.jar -DgroupId=jalview.org -DartifactId=jalview -Dversion=1.0 -Dpackaging=jar -DlocalRepositoryPath=lib
20 to install the jalview.jar file in the local maven repository. The pom.xml in the benchmarking references this installation, so if you change the names the pom.xml file will also need to be updated.
21
22
23 5. Build and run jmh benchmarking. In the benchmarking directory:
24   mvn clean install
25   java -jar target/benchmarks.jar
26   
27   To get JSON output instead use:
28   java -jar target/benchmarks.jar -rf json
29   
30   To run a specific benchmark file use:
31   java -jar target/benchmarks.jar <Benchmark class name> 
32   
33   JSON output can be viewed quickly by drag-dropping on http://jmh.morethan.io/
34   
35   To get help use the standard -h option:
36         java -jar target/benchmarks.jar -h
37         
38   More information here:
39         http://openjdk.java.net/projects/code-tools/jmh/
40         http://java-performance.info/jmh/
41   
42   
43  6. If you make changes to the Jalview code everything will need to be refreshed, by performing steps 3-5 again.
44