-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from DaanVanYperen/develop
Develop
- Loading branch information
Showing
110 changed files
with
1,794 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Adrian Papari (https://github.com/junkdog) | ||
Adrian Papari (https://github.com/junkdog) | ||
Namek (https://github.com/Namek) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>net.mostlyoriginal.artemis-odb</groupId> | ||
<artifactId>contrib-parent</artifactId> | ||
<version>0.9.1</version> | ||
</parent> | ||
<artifactId>contrib-benchmark</artifactId> | ||
<packaging>jar</packaging> | ||
<name>contrib-benchmark</name> | ||
<description>Benchmark</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>net.onedaybeard.artemis</groupId> | ||
<artifactId>artemis-odb</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>net.mostlyoriginal.artemis-odb</groupId> | ||
<artifactId>contrib-eventbus</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-core</artifactId> | ||
<version>0.9.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-generator-annprocess</artifactId> | ||
<version>0.9.5</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.2</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>microbenchmarks</finalName> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>org.openjdk.jmh.Main</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
14 changes: 14 additions & 0 deletions
14
contrib-benchmark/src/main/java/net/mostlyoriginal/api/MyBenchmark.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.mostlyoriginal.api; | ||
|
||
import org.openjdk.jmh.annotations.*; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
/** | ||
* Default benchmark settings. | ||
*/ | ||
@State(Scope.Thread) | ||
@Threads(1) | ||
@Fork(1) | ||
public class MyBenchmark { | ||
} |
37 changes: 37 additions & 0 deletions
37
...rk/src/main/java/net/mostlyoriginal/api/event/dispatcher/BaselineDispatcherBenchmark.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package net.mostlyoriginal.api.event.dispatcher; | ||
|
||
import net.mostlyoriginal.api.event.common.Event; | ||
import net.mostlyoriginal.api.event.common.EventDispatchStrategy; | ||
import net.mostlyoriginal.api.event.common.EventListener; | ||
|
||
/** | ||
* Test basic dispatcher. | ||
* | ||
* @author DaanVanYperen | ||
*/ | ||
public class BaselineDispatcherBenchmark extends DispatcherBenchmark { | ||
|
||
protected EventDispatchStrategy instanceDispatcher() { | ||
return new EmptyEventDispatcher(); | ||
} | ||
|
||
private class EmptyEventDispatcher implements EventDispatchStrategy { | ||
@Override | ||
public void register(EventListener listener) { | ||
} | ||
|
||
@Override | ||
public void dispatch(Event event) { | ||
} | ||
|
||
@Override | ||
public <T extends Event> T dispatch(Class<T> type) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void process() { | ||
|
||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...hmark/src/main/java/net/mostlyoriginal/api/event/dispatcher/BasicDispatcherBenchmark.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.mostlyoriginal.api.event.dispatcher; | ||
|
||
import net.mostlyoriginal.api.event.common.EventDispatchStrategy; | ||
|
||
/** | ||
* Test basic dispatcher. | ||
* | ||
* @author DaanVanYperen | ||
*/ | ||
public class BasicDispatcherBenchmark extends DispatcherBenchmark { | ||
|
||
protected EventDispatchStrategy instanceDispatcher() { | ||
return new BasicEventDispatcher(); | ||
} | ||
} |
Oops, something went wrong.