JAL-2662 tweak README, format code
[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 2. Make a lib directory in benchmarking/ if not already present and cd into this directory.
11
12 3. Purge any previous maven dependencies:
13    mvn dependency:purge-local-repository -DactTransitively=false -DreResolve=false
14
15 4. Run
16   mvn install:install-file -Dfile=../dist/jalview.jar -DgroupId=jalview.org -DartifactId=jalview -Dversion=1.0 -Dpackaging=jar -DlocalRepositoryPath=lib
17
18 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.
19
20 5. Build and run jmh benchmarking. In the benchmarking directory:
21   mvn clean install
22   java -jar target/benchmarks.jar
23   
24   To get JSON output instead use:
25   java -jar target/benchmarks.jar -rf json
26   
27   JSON output can be viewed quickly by drag-dropping on http://jmh.morethan.io/