Skip to content

Commit

Permalink
Merge pull request #59 from DaanVanYperen/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DaanVanYperen committed May 27, 2015
2 parents abc35ce + a144fa4 commit dcead1d
Show file tree
Hide file tree
Showing 110 changed files with 1,794 additions and 289 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Version: 0.9.1

- New polling event dispatcher.
- Upgraded to artemis-odb 0.9.1-SNAPSHOT, libGDX-1.6.1
- Event benchmarking.
- Moved all example components and systems to contrib-jam module.

## Version: 0.7

- Drop in Eventbus.
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTORS
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)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ with gwt support, check out these instead:
- [playn-artemis-quickstart](https://github.com/DaanVanYperen/playn-artemis-quickstart)

### Library Versions
Artemis-odb 0.7.1, (Optional) LibGDX 1.3.1
Artemis-odb 0.9.1-SNAPSHOT, (Optional) LibGDX 1.6.1

### License
The primary license for this code is CC0.
Expand All @@ -29,21 +29,21 @@ The primary license for this code is CC0.
<dependency>
<groupId>net.mostlyoriginal.artemis-odb</groupId>
<artifactId>contrib-core</artifactId>
<version>0.7.1</version>
<version>0.9.1</version>
</dependency>

<dependency>
<groupId>net.mostlyoriginal.artemis-odb</groupId>
<artifactId>contrib-eventbus</artifactId>
<version>0.7.1</version>
<version>0.9.1</version>
</dependency>
```

#### Gradle

```groovy
dependencies {
compile "net.mostlyoriginal.artemis-odb:contrib-core:0.7.1"
compile "net.mostlyoriginal.artemis-odb:contrib-eventbus:0.7.1"
compile "net.mostlyoriginal.artemis-odb:contrib-core:0.9.1"
compile "net.mostlyoriginal.artemis-odb:contrib-eventbus:0.9.1"
}
```
73 changes: 73 additions & 0 deletions contrib-benchmark/pom.xml
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>
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 {
}
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() {

}
}
}
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();
}
}
Loading

0 comments on commit dcead1d

Please sign in to comment.