Skip to content

Commit dba6998

Browse files
Artem LabazinArtem Labazin
authored andcommitted
Correct benchmark tests and root pom.xml
1 parent b303690 commit dba6998

File tree

7 files changed

+36
-25
lines changed

7 files changed

+36
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ nb-configuration.xml
112112
log*.txt*
113113
.DS_Store
114114
.vscode/
115+
settings.xml

benchmark/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $> sudo apt-get update && sudo apt-get upgrade
7979
3. Install `Git`, `Java 8` and `Maven`:
8080

8181
```bash
82-
$> sudo apt-get install oracle-java8-installer git maven
82+
$> sudo apt-get install -y oracle-java8-installer git maven
8383
```
8484

8585
4. Clone the repo:

benchmark/src/main/java/io/appulse/encon/benchmark/Encon_Node2NodeBenchmarks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
/**
4949
*
50-
* @since 1.6.0
50+
* @since 1.6.3
5151
* @author Artem Labazin
5252
*/
5353
@State(Benchmark)

benchmark/src/main/java/io/appulse/encon/benchmark/Encon_SimpleBenchmarks.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
/**
4646
*
47-
* @since 1.6.0
47+
* @since 1.6.3
4848
* @author Artem Labazin
4949
*/
5050
@OutputTimeUnit(SECONDS)
@@ -70,14 +70,12 @@ public void oneDirectionSend (OneDirectionSendState state, Blackhole blackHole)
7070
@State(Benchmark)
7171
public static class Mailbox2MailboxAndBackState {
7272

73-
Node node1;
73+
Node node;
7474

7575
Mailbox mailbox1;
7676

7777
ErlangPid pid1;
7878

79-
Node node2;
80-
8179
Mailbox mailbox2;
8280

8381
ErlangPid pid2;
@@ -95,12 +93,12 @@ public void setup () throws Exception {
9593
)
9694
.build();
9795

98-
node1 = Nodes.singleNode("node-1-" + System.nanoTime(), config);
99-
mailbox1 = node1.mailbox().build();
96+
node = Nodes.singleNode("node-" + System.nanoTime(), config);
97+
98+
mailbox1 = node.mailbox().build();
10099
pid1 = mailbox1.getPid();
101100

102-
node2 = Nodes.singleNode("node-2-" + System.nanoTime(), config);
103-
mailbox2 = node2.mailbox().build();
101+
mailbox2 = node.mailbox().build();
104102
pid2 = mailbox2.getPid();
105103

106104
data = binary(new byte[] { 1, 2, 3, 4, 5 });
@@ -109,10 +107,9 @@ public void setup () throws Exception {
109107
@TearDown(Trial)
110108
public void tearDown () {
111109
mailbox1.close();
112-
node1.close();
113-
114110
mailbox2.close();
115-
node2.close();
111+
112+
node.close();
116113
}
117114
}
118115

benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_Node2NodeBenchmarks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
/**
4444
*
45-
* @since 1.6.0
45+
* @since 1.6.3
4646
* @author Artem Labazin
4747
*/
4848
@State(Benchmark)

benchmark/src/main/java/io/appulse/encon/benchmark/JInterface_SimpleBenchmarks.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
/**
4040
*
41-
* @since 1.6.0
41+
* @since 1.6.3
4242
* @author Artem Labazin
4343
*/
4444
@OutputTimeUnit(SECONDS)
@@ -64,14 +64,12 @@ public void oneDirectionSend (OneDirectionSendState state, Blackhole blackHole)
6464
@State(Benchmark)
6565
public static class Mailbox2MailboxAndBackState {
6666

67-
OtpNode node1;
67+
OtpNode node;
6868

6969
OtpMbox mailbox1;
7070

7171
OtpErlangPid pid1;
7272

73-
OtpNode node2;
74-
7573
OtpMbox mailbox2;
7674

7775
OtpErlangPid pid2;
@@ -80,12 +78,12 @@ public static class Mailbox2MailboxAndBackState {
8078

8179
@Setup(Trial)
8280
public void setup () throws Exception {
83-
node1 = new OtpNode("node-1-" + System.nanoTime() + "@localhost");
84-
mailbox1 = node1.createMbox();
81+
node = new OtpNode("node-" + System.nanoTime() + "@localhost");
82+
83+
mailbox1 = node.createMbox();
8584
pid1 = mailbox1.self();
8685

87-
node2 = new OtpNode("node-2-" + System.nanoTime() + "@localhost");
88-
mailbox2 = node2.createMbox();
86+
mailbox2 = node.createMbox();
8987
pid2 = mailbox2.self();
9088

9189
data = new OtpErlangBinary(new byte[] { 1, 2, 3, 4, 5 });
@@ -94,10 +92,9 @@ public void setup () throws Exception {
9492
@TearDown(Trial)
9593
public void tearDown () {
9694
mailbox1.close();
97-
node1.close();
98-
9995
mailbox2.close();
100-
node2.close();
96+
97+
node.close();
10198
}
10299
}
103100

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,22 @@ limitations under the License.
423423
</execution>
424424
</executions>
425425
</plugin>
426+
427+
<plugin>
428+
<groupId>org.apache.maven.plugins</groupId>
429+
<artifactId>maven-deploy-plugin</artifactId>
430+
<inherited>false</inherited>
431+
</plugin>
432+
<plugin>
433+
<groupId>org.sonatype.plugins</groupId>
434+
<artifactId>nexus-staging-maven-plugin</artifactId>
435+
<inherited>false</inherited>
436+
</plugin>
437+
<plugin>
438+
<groupId>org.apache.maven.plugins</groupId>
439+
<artifactId>maven-gpg-plugin</artifactId>
440+
<inherited>false</inherited>
441+
</plugin>
426442
</plugins>
427443
</build>
428444
</project>

0 commit comments

Comments
 (0)