pom.xml revision 10eb47be
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4  ~ Copyright (c) 2016 Cisco and/or its affiliates.
5  ~
6  ~ Licensed under the Apache License, Version 2.0 (the "License");
7  ~ you may not use this file except in compliance with the License.
8  ~ You may obtain a copy of the License at:
9  ~
10  ~     http://www.apache.org/licenses/LICENSE-2.0
11  ~
12  ~ Unless required by applicable law or agreed to in writing, software
13  ~ distributed under the License is distributed on an "AS IS" BASIS,
14  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ~ See the License for the specific language governing permissions and
16  ~ limitations under the License.
17  -->
18
19<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21
22    <parent>
23        <groupId>io.fd.honeycomb.common</groupId>
24        <artifactId>honeycomb-parent</artifactId>
25        <version>1.17.10-SNAPSHOT</version>
26        <relativePath>../../../common/honeycomb-parent</relativePath>
27    </parent>
28
29    <modelVersion>4.0.0</modelVersion>
30    <groupId>io.fd.honeycomb</groupId>
31    <artifactId>benchmark</artifactId>
32    <version>1.17.10-SNAPSHOT</version>
33    <packaging>jar</packaging>
34
35    <properties>
36        <jmh.version>1.15</jmh.version>
37        <uberjar.name>benchmarks</uberjar.name>
38    </properties>
39
40    <dependencies>
41        <dependency>
42            <groupId>org.openjdk.jmh</groupId>
43            <artifactId>jmh-core</artifactId>
44            <version>${jmh.version}</version>
45        </dependency>
46        <dependency>
47            <groupId>org.openjdk.jmh</groupId>
48            <artifactId>jmh-generator-annprocess</artifactId>
49            <version>${jmh.version}</version>
50            <scope>provided</scope>
51        </dependency>
52        <dependency>
53            <groupId>io.fd.honeycomb</groupId>
54            <artifactId>minimal-distribution</artifactId>
55            <version>${project.version}</version>
56        </dependency>
57        <dependency>
58            <groupId>io.fd.honeycomb.it</groupId>
59            <artifactId>honeycomb-test-model</artifactId>
60            <version>${project.version}</version>
61        </dependency>
62        <dependency>
63            <groupId>org.apache.commons</groupId>
64            <artifactId>commons-csv</artifactId>
65            <version>1.4</version>
66        </dependency>
67
68    </dependencies>
69
70    <build>
71        <resources>
72            <resource>
73                <directory>${basedir}/src/main/resources</directory>
74                <!-- Enable maven to replace properties in resource files -->
75                <filtering>true</filtering>
76            </resource>
77        </resources>
78        <plugins>
79            <plugin>
80                <artifactId>maven-dependency-plugin</artifactId>
81                <executions>
82                    <execution>
83                        <id>build-classpath</id>
84                        <phase>compile</phase>
85                        <goals>
86                            <goal>build-classpath</goal>
87                        </goals>
88                        <configuration>
89                            <outputProperty>depClasspath</outputProperty>
90                        </configuration>
91                    </execution>
92                </executions>
93            </plugin>
94            <plugin>
95                <groupId>org.codehaus.mojo</groupId>
96                <artifactId>exec-maven-plugin</artifactId>
97                <executions>
98                    <execution>
99                        <id>benchmark</id>
100                        <phase>test</phase>
101                        <goals>
102                            <goal>java</goal>
103                        </goals>
104                        <configuration>
105                            <mainClass>org.openjdk.jmh.Main</mainClass>
106                            <systemProperties>
107                                <systemProperty>
108                                    <key>java.class.path</key>
109                                    <value>${project.build.outputDirectory}${path.separator}${depClasspath}</value>
110                                </systemProperty>
111                            </systemProperties>
112                            <arguments>
113                                <!-- Reference org.openjdk.jmh.runner.options.CommandLineOptions -->
114
115                                <!-- Fail on error -->
116                                <argument>-foe=true</argument>
117
118                                <!-- PROFILING -->
119                                <!--        cl: Classloader profiling via standard MBeans
120                                          comp: JIT compiler profiling via standard MBeans
121                                            gc: GC profiling via standard MBeans
122                                         hs_cl: HotSpot (tm) classloader profiling via implementation-specific MBeans
123                                       hs_comp: HotSpot (tm) JIT compiler profiling via implementation-specific MBeans
124                                         hs_gc: HotSpot (tm) memory manager (GC) profiling via implementation-specific MBeans
125                                         hs_rt: HotSpot (tm) runtime profiling via implementation-specific MBeans
126                                        hs_thr: HotSpot (tm) threading subsystem via implementation-specific MBeans
127                                        pauses: Pauses profiler
128                                         stack: Simple and naive Java stack profiler -->
129                                <!--<argument>-prof=gc</argument>-->
130
131                                <!-- REPORT -->
132                                <!-- formats = Available formats: text, csv, scsv, json, latex-->
133                                <argument>-rf=csv</argument>
134                                <argument>-rff=${project.build.directory}/benchmark.csv</argument>
135                            </arguments>
136                        </configuration>
137                    </execution>
138                    <execution>
139                        <id>benchmark-post-processing</id>
140                        <phase>test</phase>
141                        <goals>
142                            <goal>java</goal>
143                        </goals>
144                        <configuration>
145                            <mainClass>io.fd.honeycomb.benchmark.format.BenchmarkOutputFormatter</mainClass>
146                            <arguments>
147                                <argument>${project.build.directory}/benchmark.csv</argument>
148                            </arguments>
149                        </configuration>
150                    </execution>
151                </executions>
152            </plugin>
153        </plugins>
154    </build>
155
156</project>
157