Permalink
Browse files

MODE-1181 Add Benchmark to track connector performance over time

Added simple framework for benchmark testing of connectors. The benchmark runs a series of tests against
all of the connectors configured within a single ModeShapeEngine, and then generates an HTML report
with a graph for each test showing the performance of each connector.
  • Loading branch information...
1 parent 1999011 commit 6d81422b14582d3ab5c9d233d67d2e741620fdb1 @bcarothers-xx bcarothers-xx committed with rhauch Jul 1, 2011
@@ -41,6 +41,7 @@
import org.modeshape.common.annotation.Immutable;
import org.modeshape.common.annotation.NotThreadSafe;
import org.modeshape.common.util.Base64;
+import org.modeshape.common.util.FileUtil;
import org.modeshape.common.util.IoUtil;
import org.modeshape.common.util.ObjectUtil;
import org.modeshape.graph.connector.base.MapWorkspace;
@@ -137,7 +138,7 @@ public DiskWorkspace( String name,
public void destroy() {
- this.workspaceRoot.delete();
+ FileUtil.delete(workspaceRoot);
repository.diskSource().removeNodeCachePolicyChangedListener(this);
}
View
@@ -175,7 +175,7 @@
<jpaSource.referentialIntegrityEnforced>true</jpaSource.referentialIntegrityEnforced>
<jpaSource.largeValueSizeInBytes>150</jpaSource.largeValueSizeInBytes>
<jpaSource.autoGenerateSchema>create</jpaSource.autoGenerateSchema>
- <jpaSource.compressData />
+ <jpaSource.compressData>true</jpaSource.compressData>
<jpaSource.cacheTimeToLiveInMilliseconds />
<jpaSource.creatingWorkspacesAllowed />
<jpaSource.defaultWorkspaceName />
@@ -922,6 +922,11 @@
<artifactId>modeshape-connector-store-jpa</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-connector-disk</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-connector-filesystem</artifactId>
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-parent</artifactId>
+ <version>2.6-SNAPSHOT</version>
+ <relativePath>../../modeshape-parent</relativePath>
+ </parent>
+ <!-- The groupId and version values are inherited from parent -->
+ <artifactId>modeshape-connector-benchmark</artifactId>
+ <packaging>jar</packaging>
+ <name>ModeShape Benchmark for Connectors</name>
+ <description>A series of benchmark scenarios to compare connector performance in different use cases.</description>
+ <url>http://www.modeshape.org</url>
+ <!--
+ Define the dependencies. Note that all version and scopes default to those defined in the dependencyManagement section of the
+ parent pom.
+ -->
+ <dependencies>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-repository</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-connector-disk</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-connector-filesystem</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-connector-infinispan</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>modeshape-connector-store-jpa</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>*</include>
+ <include>**/*</include>
+ </includes>
+ </testResource>
+ <!-- Apply the properties set in the POM to the resource files -->
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>performance/*.xml</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+</project>
Oops, something went wrong.

0 comments on commit 6d81422

Please sign in to comment.