Mercurial > stress-tester
changeset 658:c310cbb9c8ff
stress-tester-misc fixed
author | Devel 1 |
---|---|
date | Mon, 13 Nov 2017 09:32:07 +0100 |
parents | 91a8438f1c5e |
children | 827609bd0999 |
files | stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeEventSource.java stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeSource.java |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeEventSource.java Thu Nov 09 15:50:40 2017 +0100 +++ b/stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeEventSource.java Mon Nov 13 09:32:07 2017 +0100 @@ -169,7 +169,7 @@ HttpResponse response = (HttpResponse) responseDecoder.getResult(); responseDecoder.clear(); - return new HttpSessionPayloadEvent(si, request, response); + return new HttpSessionPayloadEvent(si, request, response, "source0"); } public static void main(String[] args) {
--- a/stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeSource.java Thu Nov 09 15:50:40 2017 +0100 +++ b/stress-tester-misc/src/main/java/com/passus/ambience/st/misc/FakeSource.java Mon Nov 13 09:32:07 2017 +0100 @@ -8,7 +8,8 @@ import com.passus.st.AppUtils; import com.passus.st.Log4jConfigurationFactory; import com.passus.st.client.http.HttpClient; -import com.passus.st.client.http.HttpReporterClientListener; +import com.passus.st.client.http.ReporterDestination; +import com.passus.st.client.http.ReporterRemoteDestination; import com.passus.st.client.http.WriterHttpClientListener; import com.passus.st.client.http.filter.HttpFiltersConfigurator; import com.passus.st.client.http.filter.HttpSessionCookieFilter; @@ -18,7 +19,8 @@ import com.passus.st.emitter.nio.NioEmitter; import com.passus.st.metric.FileMetricsCollectionAppender; import com.passus.st.metric.ScheduledMetricsCollector; -import com.passus.st.reporter.server.ReporterClient; +import com.passus.st.reporter.ReporterClient; +import com.passus.st.reporter.trx.SocketReporterClient; import java.io.File; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -155,7 +157,7 @@ Configuration config = YamlConfigurationReader.readFromFile(filtersFile); HttpFiltersConfigurator configurator = new HttpFiltersConfigurator(client); Errors errors = new Errors(); - configurator.configure(config, errors); + configurator.configure(config, errors, null); if (errors.getErrorCount() != 0) { System.out.println("Error in file '" + filtersFile.getAbsolutePath() + "'."); for (ObjectError error : errors.getAllErrors()) { @@ -169,9 +171,11 @@ if (cl.hasOption("ri")) { int port = 11111; InetAddress addr = InetAddress.getByName(cl.getOptionValue("ri")); - ReporterClient reporterClient = new ReporterClient(new InetSocketAddress(addr, port)); + InetSocketAddress socketAddr = new InetSocketAddress(addr, port); + ReporterClient reporterClient = new SocketReporterClient(socketAddr, 2); reporterClient.start(); - client.addListener(new HttpReporterClientListener(reporterClient)); + ReporterDestination reporterDestination = new ReporterRemoteDestination(reporterClient); + client.addListener(reporterDestination); } WriterHttpClientListener writerListener;