Skip to content

Commit

Permalink
# IGNITE-102. Fixes to make benchmarks runnable.
Browse files Browse the repository at this point in the history
  • Loading branch information
akuznetsov-gridgain committed Jan 28, 2015
1 parent c9aadf0 commit aee11a0
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 38 deletions.
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-atomic-win.properties
Expand Up @@ -21,7 +21,7 @@ set JVM_OPTS=%JVM_OPTS% -DGRIDGAIN_QUIET=false
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

:: Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

:: Probe point writer class name.
:: BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-atomic.properties
Expand Up @@ -23,7 +23,7 @@ JVM_OPTS=${JVM_OPTS}" -DGRIDGAIN_QUIET=false"
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

# Probe point writer class name.
# BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-compute-win.properties
Expand Up @@ -21,7 +21,7 @@ set JVM_OPTS=%JVM_OPTS% -DGRIDGAIN_QUIET=false
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

:: Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

:: Probe point writer class name.
:: BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-compute.properties
Expand Up @@ -23,7 +23,7 @@ JVM_OPTS=${JVM_OPTS}" -DGRIDGAIN_QUIET=false"
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

# Probe point writer class name.
# BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-query-win.properties
Expand Up @@ -21,7 +21,7 @@ set JVM_OPTS=%JVM_OPTS%^
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

:: Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

:: Probe point writer class name.
:: BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-query.properties
Expand Up @@ -23,7 +23,7 @@ JVM_OPTS=${JVM_OPTS}" -DGRIDGAIN_QUIET=false" \
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

# Probe point writer class name.
# BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-tx-win.properties
Expand Up @@ -21,7 +21,7 @@ set JVM_OPTS=%JVM_OPTS% -DGRIDGAIN_QUIET=false
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

:: Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

:: Probe point writer class name.
:: BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-tx.properties
Expand Up @@ -23,7 +23,7 @@ JVM_OPTS=${JVM_OPTS}" -DGRIDGAIN_QUIET=false"
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

# Packages where the specified benchmark is searched by reflection mechanism, comma separated.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

# Probe point writer class name.
# BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark-win.properties
Expand Up @@ -24,7 +24,7 @@ set JVM_OPTS=%JVM_OPTS% -DGRIDGAIN_QUIET=false
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

:: Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

:: Probe point writer class name.
:: BENCHMARK_WRITER=
Expand Down
2 changes: 1 addition & 1 deletion modules/yardstick/config/benchmark.properties
Expand Up @@ -26,7 +26,7 @@ JVM_OPTS=${JVM_OPTS}" -DGRIDGAIN_QUIET=false"
BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe

# Packages where the specified benchmark is searched by reflection mechanism.
BENCHMARK_PACKAGES=org.yardstickframework
BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick

# Probe point writer class name.
# BENCHMARK_WRITER=
Expand Down
10 changes: 5 additions & 5 deletions modules/yardstick/config/ignite-base-config.xml
Expand Up @@ -24,7 +24,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="base-grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" abstract="true">
<bean id="base-ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" abstract="true">
<property name="peerClassLoadingEnabled" value="false"/>

<!--property name="marshaller">
Expand All @@ -46,7 +46,7 @@

<property name="cacheConfiguration">
<list>
<bean class="org.gridgain.grid.cache.GridCacheConfiguration">
<bean class="org.apache.ignite.cache.CacheConfiguration">
<property name="name" value="atomic"/>

<property name="cacheMode" value="PARTITIONED"/>
Expand All @@ -58,7 +58,7 @@
<property name="queryIndexEnabled" value="false"/>
</bean>

<bean class="org.gridgain.grid.cache.GridCacheConfiguration">
<bean class="org.apache.ignite.cache.CacheConfiguration">
<property name="name" value="tx"/>

<property name="cacheMode" value="PARTITIONED"/>
Expand All @@ -70,7 +70,7 @@
<property name="queryIndexEnabled" value="false"/>
</bean>

<bean class="org.gridgain.grid.cache.GridCacheConfiguration">
<bean class="org.apache.ignite.cache.CacheConfiguration">
<property name="name" value="query"/>

<property name="cacheMode" value="PARTITIONED"/>
Expand All @@ -83,7 +83,7 @@
<property name="queryIndexEnabled" value="true"/>
</bean>

<bean class="org.gridgain.grid.cache.GridCacheConfiguration">
<bean class="org.apache.ignite.cache.CacheConfiguration">
<property name="name" value="compute"/>

<property name="cacheMode" value="PARTITIONED"/>
Expand Down
4 changes: 2 additions & 2 deletions modules/yardstick/config/ignite-localhost-config.xml
Expand Up @@ -24,9 +24,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<import resource="gridgain-base-config.xml"/>
<import resource="ignite-base-config.xml"/>

<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-grid.cfg">
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-ignite.cfg">
<property name="localHost" value="127.0.0.1"/>

<property name="discoverySpi">
Expand Down
4 changes: 2 additions & 2 deletions modules/yardstick/config/ignite-multicast-config.xml
Expand Up @@ -24,9 +24,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<import resource="gridgain-base-config.xml"/>
<import resource="ignite-base-config.xml"/>

<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-grid.cfg">
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-ignite.cfg">
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
Expand Down
8 changes: 8 additions & 0 deletions modules/yardstick/pom.xml
Expand Up @@ -172,6 +172,14 @@
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Expand Up @@ -24,8 +24,8 @@

import java.util.concurrent.*;

import static org.apache.ignite.events.IgniteEventType.*;
import static org.apache.ignite.cache.CacheDistributionMode.*;
import static org.apache.ignite.events.IgniteEventType.*;
import static org.yardstickframework.BenchmarkUtils.*;

/**
Expand All @@ -42,7 +42,7 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter {
@Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
super.setUp(cfg);

jcommander(cfg.commandLineArguments(), args, "<gridgain-driver>");
jcommander(cfg.commandLineArguments(), args, "<ignite-driver>");

if (Ignition.state() != IgniteState.STARTED) {
node = new IgniteNode(args.distributionMode() == CLIENT_ONLY);
Expand Down Expand Up @@ -79,7 +79,7 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter {
* @return Grid.
*/
protected Ignite grid() {
return node.grid();
return node.ignite();
}

/**
Expand Down
Expand Up @@ -40,7 +40,7 @@
*/
public class IgniteNode implements BenchmarkServer {
/** Grid instance. */
private Ignite grid;
private Ignite ignite;

/** Client mode. */
private boolean clientMode;
Expand All @@ -56,16 +56,16 @@ public IgniteNode(boolean clientMode) {
}

/** */
public IgniteNode(boolean clientMode, Ignite grid) {
public IgniteNode(boolean clientMode, Ignite ignite) {
this.clientMode = clientMode;
this.grid = grid;
this.ignite = ignite;
}

/** {@inheritDoc} */
@Override public void start(BenchmarkConfiguration cfg) throws Exception {
IgniteBenchmarkArguments args = new IgniteBenchmarkArguments();

BenchmarkUtils.jcommander(cfg.commandLineArguments(), args, "<gridgain-node>");
BenchmarkUtils.jcommander(cfg.commandLineArguments(), args, "<ignite-node>");

IgniteConfiguration c = loadConfiguration(args.configuration());

Expand Down Expand Up @@ -119,7 +119,7 @@ public IgniteNode(boolean clientMode, Ignite grid) {

c.setCommunicationSpi(commSpi);

grid = Ignition.start(c);
ignite = Ignition.start(c);
}

/**
Expand Down Expand Up @@ -167,7 +167,7 @@ private static IgniteConfiguration loadConfiguration(String springCfgPath) throw
}

if (cfgMap == null || cfgMap.isEmpty())
throw new Exception("Failed to find grid configuration in: " + url);
throw new Exception("Failed to find ignite configuration in: " + url);

return cfgMap.values().iterator().next();
}
Expand All @@ -183,9 +183,9 @@ private static IgniteConfiguration loadConfiguration(String springCfgPath) throw
}

/**
* @return Grid.
* @return Ignite.
*/
public Ignite grid() {
return grid;
public Ignite ignite() {
return ignite;
}
}
Expand Up @@ -25,7 +25,7 @@
/**
* GridGain benchmark that performs put operations.
*/
public class IgnitePutBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgnitePutBenchmark extends IgniteCacheAbstractBenchmark {
/** {@inheritDoc} */
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
int key = nextRandom(args.range());
Expand Down
Expand Up @@ -25,7 +25,7 @@
/**
* GridGain benchmark that performs put and get operations.
*/
public class IgnitePutGetBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgnitePutGetBenchmark extends IgniteCacheAbstractBenchmark {
/** {@inheritDoc} */
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
int key = nextRandom(args.range());
Expand Down
Expand Up @@ -26,7 +26,7 @@
/**
* GridGain benchmark that performs transactional put and get operations.
*/
public class IgnitePutGetTxBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgnitePutGetTxBenchmark extends IgniteCacheAbstractBenchmark {
/** {@inheritDoc} */
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
int key = nextRandom(0, args.range() / 2);
Expand Down
Expand Up @@ -25,7 +25,7 @@
/**
* GridGain benchmark that performs transactional put operations.
*/
public class IgnitePutTxBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgnitePutTxBenchmark extends IgniteCacheAbstractBenchmark {
/** {@inheritDoc} */
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
int key = nextRandom(args.range());
Expand Down
Expand Up @@ -30,7 +30,7 @@
/**
* GridGain benchmark that performs query operations.
*/
public class IgniteSqlQueryBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgniteSqlQueryBenchmark extends IgniteCacheAbstractBenchmark {
/** */
private CacheQuery qry;

Expand Down
Expand Up @@ -30,7 +30,7 @@
/**
* GridGain benchmark that performs query operations with joins.
*/
public class IgniteSqlQueryJoinBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgniteSqlQueryJoinBenchmark extends IgniteCacheAbstractBenchmark {
/** */
private CacheQuery qry;

Expand Down
Expand Up @@ -28,7 +28,7 @@
/**
* GridGain benchmark that performs put and query operations.
*/
public class IgniteSqlQueryPutBenchmarkIgnite extends IgniteCacheAbstractBenchmark {
public class IgniteSqlQueryPutBenchmark extends IgniteCacheAbstractBenchmark {
/** */
private CacheQuery qry;

Expand Down

0 comments on commit aee11a0

Please sign in to comment.