Skip to content

Commit

Permalink
Move performance-relative classes in perf package
Browse files Browse the repository at this point in the history
  • Loading branch information
acogoluegnes committed Sep 27, 2016
1 parent 22cdfc7 commit a57ed36
Show file tree
Hide file tree
Showing 32 changed files with 39 additions and 72 deletions.
8 changes: 4 additions & 4 deletions HTML_PERFORMANCE_TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ to the root folder of the binary distribution and run the following
command to start the benchmark:

```bash
bin/runjava com.rabbitmq.examples.PerfTestMulti
bin/runjava com.rabbitmq.perf.PerfTestMulti
publish-consume-spec.js publish-consume-result.js
```

Expand Down Expand Up @@ -345,23 +345,23 @@ As an alternative, from the root directory of the binary distribution,
you can launch a Java-based web server:

```
bin/runjava com.rabbitmq.examples.WebServer
bin/runjava com.rabbitmq.perf.WebServer
```

The latter command starts a web server listening on port 8080, with the
`html` directory as its base directory. You can then see the included
sample at http://localhost:8080/examples/sample.html. To change these defaults:

```
bin/runjava com.rabbitmq.examples.WebServer ./other-base-dir 9090
bin/runjava com.rabbitmq.perf.WebServer ./other-base-dir 9090
```

At last, if you want a quick preview of your results (same layout
as the first 'consume' scenario above), ensure the scenario name is
'benchmark' in the result file and launch the following command:

```
$ bin/runjava com.rabbitmq.examples.BenchmarkResults my-result-file.js
$ bin/runjava com.rabbitmq.perf.BenchmarkResults my-result-file.js
```

The latter command will start a web server on port 8080 and open
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Assuming the current directory is the root directory of the binary distribution,
to launch a performance test with 1 producer and 1 consumer:

```
bin/runjava com.rabbitmq.examples.PerfTest
bin/runjava com.rabbitmq.perf.PerfTest
```

### Using the HTML performance tools
Expand Down
2 changes: 1 addition & 1 deletion scripts/PerfTest
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ SRCDIR=$(cd "$SCRIPTDIR"/.. && pwd)
cd "$SRCDIR"
mvn -q test-compile -P '!setup-test-cluster'
mvn -q exec:java \
-Dexec.mainClass="com.rabbitmq.examples.PerfTest" "$@"
-Dexec.mainClass="com.rabbitmq.perf.PerfTest" "$@"
)
2 changes: 1 addition & 1 deletion scripts/runperftest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

run() {
echo "=== running with '$2'"
sh `dirname $0`/runjava com.rabbitmq.examples.PerfTest -h $1 -z 10 -i 20 $2
sh `dirname $0`/runjava com.rabbitmq.perf.PerfTest -h $1 -z 10 -i 20 $2
sleep 2
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/runperftestMaven
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cd `dirname $0`/..
run() {
echo "=== running with '$2'"
mvn -q exec:java -Dexec.mainClass="com.rabbitmq.examples.PerfTest" -Dexec.args=" -h $1 -z 10 -i 20 $2"
mvn -q exec:java -Dexec.mainClass="com.rabbitmq.perf.PerfTest" -Dexec.args=" -h $1 -z 10 -i 20 $2"
sleep 2
}

Expand Down
33 changes: 0 additions & 33 deletions src/main/java/com/rabbitmq/examples/MulticastMain.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples;
package com.rabbitmq.perf;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.DefaultServlet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.tools.Host;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.AMQP.BasicProperties;
import com.rabbitmq.client.Channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

class MulticastValue implements VariableValue {
private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples;
package com.rabbitmq.perf;

import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;

import com.rabbitmq.examples.perf.MulticastParams;
import com.rabbitmq.examples.perf.MulticastSet;
import com.rabbitmq.examples.perf.Stats;
import com.rabbitmq.perf.MulticastParams;
import com.rabbitmq.perf.MulticastSet;
import com.rabbitmq.perf.Stats;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.GnuParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples;
package com.rabbitmq.perf;

import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.examples.perf.Scenario;
import com.rabbitmq.examples.perf.ScenarioFactory;
import com.rabbitmq.perf.Scenario;
import com.rabbitmq.perf.ScenarioFactory;
import com.rabbitmq.tools.json.JSONReader;
import com.rabbitmq.tools.json.JSONWriter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.beans.IntrospectionException;
import java.beans.Introspector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.ConnectionFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

public interface Scenario {
public String getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.ConnectionFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.ConnectionFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

public abstract class Stats {
protected final long interval;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

public interface VariableValue {
public void setup(MulticastParams params) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import com.rabbitmq.client.ConnectionFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples.perf;
package com.rabbitmq.perf;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// If you have any questions regarding licensing, please contact us at
// info@rabbitmq.com.

package com.rabbitmq.examples;
package com.rabbitmq.perf;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.DefaultServlet;
Expand Down

0 comments on commit a57ed36

Please sign in to comment.