├── .gitignore
├── LICENSE
├── pom.xml
└── src
├── main
└── java
│ └── net
│ └── openhft
│ └── samples
│ └── microservices
│ ├── helloworld
│ ├── HelloReplier.java
│ ├── HelloWorld.java
│ ├── HelloWorldClientMain.java
│ ├── HelloWorldDumpMain.java
│ ├── HelloWorldImpl.java
│ ├── HelloWorldMain.java
│ ├── HelloWorldPerfMain.java
│ └── package-info.java
│ ├── jetty
│ ├── GUIGateway.java
│ ├── GUIGatewayListener.java
│ ├── GatewayPublisher.java
│ ├── MarketData.java
│ ├── Order.java
│ ├── OrderStatus.java
│ ├── Side.java
│ └── TradingServer.java
│ ├── orders
│ ├── MarketDataListener.java
│ ├── Order.java
│ ├── OrderIdea.java
│ ├── OrderIdeaListener.java
│ ├── OrderListener.java
│ ├── OrderManager.java
│ ├── OrderManagerMain.java
│ ├── OrderManagerPerfMain.java
│ ├── Side.java
│ ├── SidedMarketDataCombiner.java
│ ├── SidedMarketDataListener.java
│ ├── SidedPrice.java
│ ├── TopOfBookPrice.java
│ └── package-info.java
│ └── riskmonitor
│ ├── RiskMonitor.java
│ ├── Side.java
│ └── TradeDetails.java
└── test
├── java
├── net
│ └── openhft
│ │ └── samples
│ │ └── microservices
│ │ ├── helloworld
│ │ └── HelloWorldTest.java
│ │ ├── mtm-result-100k.txt
│ │ ├── mtm-result-200k.txt
│ │ ├── mtm-result-50k.txt
│ │ ├── orders
│ │ ├── ComponentsBenchmark.java
│ │ ├── ComponentsBenchmark.txt
│ │ ├── MultiThreadedMain.java
│ │ ├── OrderManagerTest.java
│ │ ├── Service.java
│ │ ├── ServiceHandler.java
│ │ ├── ServiceImpl.java
│ │ ├── ServiceWrapper.java
│ │ ├── SidedMarketDataCombinerTest.java
│ │ ├── SidedMarketDataListenerTest.java
│ │ ├── SidedPriceTest.java
│ │ ├── SimpleData.java
│ │ └── TopOfBookPriceTest.java
│ │ └── riskmonitor
│ │ └── RiskMonitorTest.java
└── queue-dump.yaml
└── results
└── E5-2650v2
├── mtm-100k.txt
├── mtm-200k.txt
├── mtm-300k.txt
├── mtm-400k.txt
├── mtm-450k.txt
├── mtm-500k.txt
└── mtm-50k.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea/*
3 | target/*
4 |
5 | *.class
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.ear
14 |
15 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
16 | hs_err_pid*
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | net.openhft.samples
5 | microservices
6 | 0.1.1
7 |
8 |
9 |
10 |
11 |
12 | net.openhft
13 | third-party-bom
14 | pom
15 | 3.5.7
16 | import
17 |
18 |
19 |
20 | net.openhft
21 | chronicle-bom
22 | 1.13.59
23 | pom
24 | import
25 |
26 |
27 |
28 |
29 |
30 |
31 | net.openhft
32 | chronicle-queue
33 |
34 |
35 |
36 | net.openhft
37 | chronicle-websocket-jetty
38 |
39 |
40 |
41 | org.openjdk.jmh
42 | jmh-core
43 | 1.12
44 |
45 |
46 |
47 | org.openjdk.jmh
48 | jmh-generator-annprocess
49 | provided
50 |
51 |
52 |
53 |
54 | junit
55 | junit
56 | test
57 |
58 |
59 |
60 | org.easymock
61 | easymock
62 | test
63 |
64 |
65 |
66 | org.slf4j
67 | slf4j-simple
68 |
69 |
70 |
71 |
72 |
73 |
74 | org.apache.maven.plugins
75 | maven-compiler-plugin
76 | 3.3
77 |
78 | 1.8
79 | 1.8
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloReplier.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | /**
4 | * Created by peter on 23/04/16.
5 | */
6 | public interface HelloReplier {
7 | void reply(String message);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | /**
4 | * Created by peter on 23/04/16.
5 | */
6 | public interface HelloWorld {
7 | void hello(String name);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorldClientMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | import net.openhft.chronicle.core.Jvm;
4 | import net.openhft.chronicle.core.OS;
5 | import net.openhft.chronicle.queue.ChronicleQueue;
6 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
7 | import net.openhft.chronicle.wire.MethodReader;
8 |
9 | import java.util.Scanner;
10 | import java.util.concurrent.atomic.AtomicLong;
11 |
12 | import static java.lang.System.err;
13 | import static java.lang.System.out;
14 |
15 | /**
16 | * Created by peter on 23/04/16.
17 | */
18 | public class HelloWorldClientMain {
19 | public static void main(String[] args) {
20 | String input = args.length > 0 ? args[0] : OS.TMP + "/input";
21 | String output = args.length > 1 ? args[1] : OS.TMP + "/output";
22 |
23 | AtomicLong lastUpdate = new AtomicLong(System.currentTimeMillis() + 1000);
24 | Thread thread = new Thread(() -> {
25 | ChronicleQueue outputQ = SingleChronicleQueueBuilder.binary(output).build();
26 | MethodReader reader = outputQ.createTailer().methodReader((HelloReplier) err::println);
27 | while (!Thread.interrupted()) {
28 | if (reader.readOne()) {
29 | lastUpdate.set(System.currentTimeMillis());
30 | } else {
31 | Jvm.pause(10);
32 | }
33 | }
34 | });
35 | thread.setDaemon(true);
36 | thread.start();
37 |
38 | ChronicleQueue inputQ = SingleChronicleQueueBuilder.binary(input).build();
39 | HelloWorld helloWorld = inputQ.createAppender().methodWriter(HelloWorld.class);
40 |
41 | Scanner scanner = new Scanner(System.in);
42 | while (true) {
43 | while (System.currentTimeMillis() < lastUpdate.get() + 30)
44 | Thread.yield();
45 |
46 | out.print("Chat ");
47 | out.flush();
48 | if (!scanner.hasNextLine())
49 | break;
50 | String line = scanner.nextLine();
51 | helloWorld.hello(line);
52 | lastUpdate.set(System.currentTimeMillis());
53 | }
54 | out.print("Bye");
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorldDumpMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.queue.ChronicleQueue;
5 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
6 |
7 | /**
8 | * Created by peter on 23/04/16.
9 | */
10 | public class HelloWorldDumpMain {
11 | public static void main(String... args) {
12 | String input = args.length > 0 ? args[0] : OS.TMP + "/input";
13 | String output = args.length > 1 ? args[1] : OS.TMP + "/output";
14 | try (ChronicleQueue inputQ = SingleChronicleQueueBuilder.binary(input).build();
15 | ChronicleQueue outputQ = SingleChronicleQueueBuilder.binary(output).build()) {
16 | System.out.println(inputQ.dump());
17 | System.out.println(outputQ.dump());
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorldImpl.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | /**
4 | * Created by peter on 23/04/16.
5 | */
6 | public class HelloWorldImpl implements HelloWorld {
7 | private final HelloReplier replier;
8 |
9 | public HelloWorldImpl(HelloReplier replier) {
10 | this.replier = replier;
11 | }
12 |
13 | @Override
14 | public void hello(String name) {
15 | replier.reply("Hello " + name);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorldMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.queue.service.ServiceWrapper;
5 | import net.openhft.chronicle.queue.service.ServiceWrapperBuilder;
6 |
7 | /**
8 | * Created by peter on 23/04/16.
9 | */
10 | public class HelloWorldMain {
11 | static ServiceWrapper serviceWrapper;
12 |
13 | public static void main(String... args) {
14 | String input = args.length > 0 ? args[0] : OS.TMP + "/input";
15 | String output = args.length > 1 ? args[1] : OS.TMP + "/output";
16 | serviceWrapper = ServiceWrapperBuilder.serviceBuilder(input, output,
17 | HelloReplier.class, HelloWorldImpl::new).get();
18 | System.out.println("Started");
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/HelloWorldPerfMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.queue.ChronicleQueue;
5 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
6 | import net.openhft.chronicle.wire.MethodReader;
7 |
8 | /**
9 | * Created by peter on 29/04/16.
10 | */
11 | public class HelloWorldPerfMain {
12 | // -verbose:gc -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=dumponexit=true,filename=myrecording.jfr,settings=profile -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints
13 | public static void main(String[] args) {
14 | int RUNS = 1000000;
15 | try (ChronicleQueue input = SingleChronicleQueueBuilder.binary(OS.TMP + "/input").build();
16 | ChronicleQueue output = SingleChronicleQueueBuilder.binary(OS.TMP + "/output").build()) {
17 | HelloWorld helloWorld = input.createAppender().methodWriter(HelloWorld.class);
18 | MethodReader reader = output.createTailer().methodReader((HelloReplier) m -> {
19 | });
20 | for (int t = 0; t < 10; t++) {
21 | long start = System.nanoTime();
22 | for (int i = 0; i < RUNS; i++) {
23 | helloWorld.hello("msg " + i);
24 | }
25 |
26 | int count = 0;
27 | while (count < RUNS)
28 | if (reader.readOne())
29 | count++;
30 | long time = System.nanoTime() - start;
31 | System.out.printf("Throughput %,d messages/sec%n", RUNS * 1_000_000_000L / time);
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/helloworld/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * This example uses a helloworld to manage more complex examples.
3 | */
4 | package net.openhft.samples.microservices.helloworld;
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/GUIGateway.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | public interface GUIGateway {
4 | void enableMarketData(boolean enabled);
5 |
6 | void newOrder(Order order);
7 | }
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/GUIGatewayListener.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | public interface GUIGatewayListener {
4 | void market(MarketData marketData);
5 |
6 | void order(OrderStatus orderStatus);
7 | }
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/GatewayPublisher.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | /**
4 | * Created by daniel on 26/04/2016.
5 | */
6 | public interface GatewayPublisher {
7 | void marketData(MarketData marketData);
8 |
9 | void orderStatus(Order order);
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/MarketData.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 25/04/16.
7 | */
8 | public class MarketData extends AbstractMarshallable{
9 | private String symbol;
10 | private double bidPrice, bidQuantity, askPrice, askQuantity;
11 |
12 | public MarketData(String symbol, double bidPrice, double bidQuantity, double askPrice, double askQuantity) {
13 | this.symbol = symbol;
14 | this.bidPrice = bidPrice;
15 | this.bidQuantity = bidQuantity;
16 | this.askPrice = askPrice;
17 |
18 | this.askQuantity = askQuantity;
19 | }
20 |
21 | @Override
22 | public String toString() {
23 | return "MarketData{" +
24 | "symbol='" + symbol + '\'' +
25 | ", bidPrice=" + bidPrice +
26 | ", bidQuantity=" + bidQuantity +
27 | ", askPrice=" + askPrice +
28 | ", askQuantity=" + askQuantity +
29 | '}';
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/Order.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 24/03/16.
7 | */
8 | public class Order extends AbstractMarshallable {
9 | String symbol;
10 | Side side;
11 | long orderId;
12 | double limitPrice, quantity;
13 |
14 | public Order(){
15 |
16 | }
17 |
18 | public Order(String symbol, Side side, long orderId, double limitPrice, double quantity) {
19 | this.symbol = symbol;
20 | this.side = side;
21 | this.orderId = orderId;
22 | this.limitPrice = limitPrice;
23 | this.quantity = quantity;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/OrderStatus.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | /**
4 | * Created by peter on 25/04/16.
5 | */
6 | public class OrderStatus extends Order {
7 | final double quantityFilled, quantityOutstanding;
8 |
9 | public OrderStatus(String symbol, Side side, long orderId, double limitPrice, double quantity, double quantityFilled, double quantityOutstanding) {
10 | super(symbol, side, orderId, limitPrice, quantity);
11 | this.quantityFilled = quantityFilled;
12 | this.quantityOutstanding = quantityOutstanding;
13 | }
14 |
15 | public OrderStatus(Order order) {
16 | this.symbol = order.symbol;
17 | this.side = order.side;
18 | this.orderId = order.orderId;
19 | this.limitPrice = order.limitPrice;
20 | this.quantity = order.quantity;
21 | quantityFilled = 0;
22 | quantityOutstanding = 0;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/Side.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | /**
4 | * Created by peter on 22/03/16.
5 | */
6 | public enum Side {
7 | Buy, Sell
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/jetty/TradingServer.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.jetty;
2 |
3 | import net.openhft.chronicle.core.Jvm;
4 | import net.openhft.chronicle.websocket.jetty.JettyWebSocketServer;
5 |
6 | import java.util.Random;
7 |
8 | /**
9 | * Created by daniel on 26/04/2016.
10 | */
11 | public class TradingServer {
12 | private final JettyWebSocketServer server;
13 |
14 | public TradingServer(int port) {
15 | this.server = new JettyWebSocketServer(port);
16 | server.addService("/*", GatewayPublisher.class, GUIGatewayPublisher::new);
17 | server.start();
18 | }
19 |
20 | public static void main(String[] args) {
21 | new TradingServer(7001);
22 | System.out.println("Server started");
23 | }
24 |
25 | static class GUIGatewayPublisher implements GUIGateway{
26 |
27 | private GatewayPublisher gatewayPublisher;
28 | private volatile boolean isStopped = false;
29 |
30 | GUIGatewayPublisher(GatewayPublisher gatewayPublisher) {
31 | this.gatewayPublisher = gatewayPublisher;
32 | System.out.println("New connection");
33 | }
34 |
35 | public void enableMarketData(boolean enable) {
36 | if(!enable)
37 | isStopped = true;
38 | else {
39 | isStopped = false;
40 | new Thread(() -> {
41 | while (!isStopped) {
42 | Random r = new Random();
43 | int[] fourRandomNumbers = r.ints(4, 0, 1001).toArray();
44 |
45 | MarketData md = new MarketData("GBP/USD",
46 | fourRandomNumbers[0],
47 | fourRandomNumbers[1],
48 | fourRandomNumbers[2],
49 | fourRandomNumbers[3]);
50 |
51 | gatewayPublisher.marketData(md);
52 |
53 | System.out.println(md);
54 | Jvm.pause(1000);
55 | }
56 | }).start();
57 | }
58 | }
59 |
60 | @Override
61 | public void newOrder(Order order) {
62 | OrderStatus orderStatus = new OrderStatus(order);
63 | System.out.println("New orderStatus received " + orderStatus);
64 | gatewayPublisher.orderStatus(orderStatus);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/MarketDataListener.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 22/03/16.
5 | */
6 | public interface MarketDataListener {
7 | void onTopOfBookPrice(TopOfBookPrice price);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/Order.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 24/03/16.
7 | */
8 | public class Order extends AbstractMarshallable {
9 | String symbol;
10 | Side side;
11 | double limitPrice, quantity;
12 |
13 | public Order(String symbol, Side side, double limitPrice, double quantity) {
14 | this.symbol = symbol;
15 | this.side = side;
16 | this.limitPrice = limitPrice;
17 | this.quantity = quantity;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderIdea.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 24/03/16.
7 | */
8 | public class OrderIdea extends AbstractMarshallable {
9 | String strategy;
10 | String symbol;
11 | Side side;
12 | double limitPrice, quantity;
13 |
14 | public OrderIdea(String strategy, String symbol, Side side, double limitPrice, double quantity) {
15 | this.strategy = strategy;
16 | this.symbol = symbol;
17 | this.side = side;
18 | this.limitPrice = limitPrice;
19 | this.quantity = quantity;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderIdeaListener.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 24/03/16.
5 | */
6 | public interface OrderIdeaListener {
7 | void onOrderIdea(OrderIdea orderIdea);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderListener.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 24/03/16.
5 | */
6 | public interface OrderListener {
7 | void onOrder(Order order);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderManager.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import java.util.Map;
4 | import java.util.TreeMap;
5 |
6 | /**
7 | * Created by peter on 24/03/16.
8 | */
9 | public class OrderManager implements MarketDataListener, OrderIdeaListener {
10 | final OrderListener orderListener;
11 | final Map priceMap = new TreeMap<>();
12 | final Map ideaMap = new TreeMap<>();
13 | long ideaCounter = 0;
14 |
15 | public OrderManager(OrderListener orderListener) {
16 | this.orderListener = orderListener;
17 | }
18 |
19 | @Override
20 | public void onTopOfBookPrice(TopOfBookPrice price) {
21 | OrderIdea idea = ideaMap.get(price.symbol);
22 | if (idea != null && placeOrder(price, idea)) {
23 | // prevent the idea being used again until the strategy asks for more
24 | ideaMap.remove(price.symbol);
25 | return;
26 | }
27 |
28 | price.mergeToMap(priceMap, p -> p.symbol);
29 | }
30 |
31 | @Override
32 | public void onOrderIdea(OrderIdea idea) {
33 | TopOfBookPrice price = priceMap.get(idea.symbol);
34 | if (price != null && placeOrder(price, idea)) {
35 | // remove the price information until we see a market data update to prevent jetty until then.
36 | priceMap.remove(idea.symbol);
37 | return;
38 | }
39 |
40 | idea.mergeToMap(ideaMap, i -> i.symbol);
41 | ideaCounter++;
42 | if (ideaCounter % 1000000 == 0)
43 | System.out.println("ideas: " + ideaCounter);
44 | }
45 |
46 | private boolean placeOrder(TopOfBookPrice price, OrderIdea idea) {
47 | double orderPrice, orderQuantity;
48 | switch (idea.side) {
49 | case Buy:
50 | if (!(price.buyPrice >= idea.limitPrice))
51 | return false;
52 | orderPrice = price.buyPrice;
53 | orderQuantity = Math.min(price.buyQuantity, idea.quantity);
54 | break;
55 | case Sell:
56 | if (!(price.sellPrice <= idea.limitPrice))
57 | return false;
58 | orderPrice = price.sellPrice;
59 | orderQuantity = Math.min(price.sellQuantity, idea.quantity);
60 | break;
61 | default:
62 | return false;
63 | }
64 |
65 | orderListener.onOrder(new Order(idea.symbol, idea.side, orderPrice, orderQuantity));
66 | return true;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderManagerMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.queue.service.ServiceWrapper;
5 | import net.openhft.chronicle.queue.service.ServiceWrapperBuilder;
6 |
7 | /**
8 | * Created by peter on 29/04/16.
9 | */
10 | public class OrderManagerMain {
11 | static ServiceWrapper serviceWrapper;
12 |
13 | public static void main(String... args) {
14 | String input = args.length > 0 ? args[0] : OS.TMP + "/order-input";
15 | String output = args.length > 1 ? args[1] : OS.TMP + "/order-output";
16 | serviceWrapper = ServiceWrapperBuilder.serviceBuilder(input, output,
17 | OrderListener.class, OrderManager::new).get();
18 | System.out.println("Started");
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/OrderManagerPerfMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.queue.ChronicleQueue;
5 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
6 | import net.openhft.chronicle.wire.MethodReader;
7 |
8 | /**
9 | * Created by peter on 29/04/16.
10 | */
11 | public class OrderManagerPerfMain {
12 | // -verbose:gc -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=dumponexit=true,filename=myrecording.jfr,settings=profile -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints
13 | public static void main(String[] args) {
14 | int RUNS = 1000000;
15 | try (ChronicleQueue input = SingleChronicleQueueBuilder.binary(OS.TMP + "/order-input").build();
16 | ChronicleQueue output = SingleChronicleQueueBuilder.binary(OS.TMP + "/order-output").build()) {
17 | OrderIdeaListener ideaListener = input.createAppender().methodWriter(OrderIdeaListener.class);
18 | MethodReader reader = output.createTailer().methodReader((OrderListener) m -> {
19 | });
20 | for (int t = 0; t < 10; t++) {
21 | long start = System.nanoTime();
22 | OrderIdea orderIdea = new OrderIdea("strategy1", "EUR/USD", null, 0.0, 0.0);
23 | for (int i = 0; i < RUNS; i++) {
24 | orderIdea.limitPrice = 1.234;
25 | orderIdea.quantity = 100e6;
26 | orderIdea.side = i % 2 == 0 ? Side.Buy : Side.Sell;
27 | ideaListener.onOrderIdea(orderIdea);
28 | }
29 |
30 | int count = 0;
31 | while (reader.readOne())
32 | count++;
33 | long time = System.nanoTime() - start;
34 | System.out.printf("Throughput %,d messages/sec%n", RUNS * 1_000_000_000L / time);
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/Side.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 22/03/16.
5 | */
6 | public enum Side {
7 | Buy, Sell
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/SidedMarketDataCombiner.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import java.util.Map;
4 | import java.util.TreeMap;
5 |
6 | /**
7 | * Created by peter on 22/03/16.
8 | */
9 | public class SidedMarketDataCombiner implements SidedMarketDataListener {
10 | final MarketDataListener mdListener;
11 | final Map priceMap = new TreeMap<>();
12 |
13 | public SidedMarketDataCombiner(MarketDataListener mdListener) {
14 | this.mdListener = mdListener;
15 | }
16 |
17 | public void onSidedPrice(SidedPrice sidedPrice) {
18 | TopOfBookPrice price = priceMap.computeIfAbsent(sidedPrice.symbol, TopOfBookPrice::new);
19 | if (price.combine(sidedPrice))
20 | mdListener.onTopOfBookPrice(price);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/SidedMarketDataListener.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 22/03/16.
5 | */
6 | public interface SidedMarketDataListener {
7 | void onSidedPrice(SidedPrice sidedPrice);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/SidedPrice.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 22/03/16.
7 | */
8 | public class SidedPrice extends AbstractMarshallable {
9 | String symbol;
10 | long timestamp;
11 | Side side;
12 | double price, quantity;
13 |
14 | public SidedPrice(String symbol, long timestamp, Side side, double price, double quantity) {
15 | init(symbol, timestamp, side, price, quantity);
16 | }
17 |
18 | public SidedPrice init(String symbol, long timestamp, Side side, double price, double quantity) {
19 | this.symbol = symbol;
20 | this.timestamp = timestamp;
21 | this.side = side;
22 | this.price = price;
23 | this.quantity = quantity;
24 | return this;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/TopOfBookPrice.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | import java.util.concurrent.TimeUnit;
6 |
7 | /**
8 | * Created by peter on 22/03/16.
9 | */
10 | public class TopOfBookPrice extends AbstractMarshallable {
11 | public static final long TIMESTAMP_LIMIT = TimeUnit.SECONDS.toMillis(1000);
12 | String symbol;
13 | long timestamp;
14 | double buyPrice, buyQuantity;
15 | double sellPrice, sellQuantity;
16 |
17 | public TopOfBookPrice(String symbol, long timestamp, double buyPrice, double buyQuantity, double sellPrice, double sellQuantity) {
18 | this.symbol = symbol;
19 | this.timestamp = timestamp;
20 | this.buyPrice = buyPrice;
21 | this.buyQuantity = buyQuantity;
22 | this.sellPrice = sellPrice;
23 | this.sellQuantity = sellQuantity;
24 | }
25 |
26 | public TopOfBookPrice(String symbol) {
27 | this.symbol = symbol;
28 | timestamp = 0;
29 | buyPrice = sellPrice = Double.NaN;
30 | buyQuantity = sellQuantity = 0;
31 | }
32 |
33 | public boolean combine(SidedPrice price) {
34 | boolean changed = false;
35 | switch (price.side) {
36 | case Buy:
37 | changed = timestamp + TIMESTAMP_LIMIT < price.timestamp ||
38 | buyPrice != price.price ||
39 | buyQuantity != price.quantity;
40 | if (changed) {
41 | timestamp = price.timestamp;
42 | buyPrice = price.price;
43 | buyQuantity = price.quantity;
44 | }
45 | break;
46 | case Sell:
47 | changed = timestamp + TIMESTAMP_LIMIT < price.timestamp ||
48 | sellPrice != price.price ||
49 | sellQuantity != price.quantity;
50 | if (changed) {
51 | timestamp = price.timestamp;
52 | sellPrice = price.price;
53 | sellQuantity = price.quantity;
54 | }
55 | break;
56 | }
57 | return changed;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/orders/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Theis example uses a minimum of helper classes to show what each part if trying to achieve.
3 | */
4 | package net.openhft.samples.microservices.orders;
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/riskmonitor/RiskMonitor.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.riskmonitor;
2 |
3 | /**
4 | * Created by peter on 13/07/16.
5 | */
6 | public interface RiskMonitor {
7 | void trade(TradeDetails tradeDetails);
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/riskmonitor/Side.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.riskmonitor;
2 |
3 | /**
4 | * Created by peter on 22/03/16.
5 | */
6 | public enum Side {
7 | Buy, Sell
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/openhft/samples/microservices/riskmonitor/TradeDetails.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.riskmonitor;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | import java.time.LocalDateTime;
6 |
7 | /**
8 | * Created by peter on 13/07/16.
9 | */
10 | public class TradeDetails extends AbstractMarshallable {
11 | LocalDateTime timestamp;
12 | String symbol;
13 | double price;
14 | double quantity;
15 | Side side;
16 | String trader;
17 |
18 | public TradeDetails(LocalDateTime timestamp, String symbol, double price, double quantity, Side side, String trader) {
19 | this.timestamp = timestamp;
20 | this.symbol = symbol;
21 | this.price = price;
22 | this.quantity = quantity;
23 | this.side = side;
24 | this.trader = trader;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/helloworld/HelloWorldTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.helloworld;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.core.io.Closeable;
5 | import net.openhft.chronicle.core.io.IOTools;
6 | import net.openhft.chronicle.queue.service.ServiceWrapper;
7 | import net.openhft.chronicle.queue.service.ServiceWrapperBuilder;
8 | import net.openhft.chronicle.wire.MethodReader;
9 | import org.junit.Test;
10 |
11 | import java.io.File;
12 |
13 | import static org.easymock.EasyMock.*;
14 |
15 | /**
16 | * Created by peter on 23/04/16.
17 | */
18 | public class HelloWorldTest {
19 | @Test
20 | public void testViaMock() {
21 | HelloReplier replier = createMock(HelloReplier.class);
22 | replier.reply("Hello April");
23 | replier.reply("Hello June");
24 | replay(replier);
25 |
26 | HelloWorld helloWorld = new HelloWorldImpl(replier);
27 | helloWorld.hello("April");
28 | helloWorld.hello("June");
29 | verify(replier);
30 | }
31 |
32 | @Test
33 | public void testWithAsQueueService() {
34 | // acts as three processes in one test
35 | // process A writes to the HelloWorld interface.
36 | // process B read fromt he HelloWorld interface and writes to the
37 | String input = OS.TARGET + "/input-" + System.nanoTime();
38 | String output = OS.TARGET + "/output-" + System.nanoTime();
39 |
40 | HelloReplier replier = createMock(HelloReplier.class);
41 | replier.reply("Hello April");
42 | replier.reply("Hello June");
43 | replay(replier);
44 |
45 | ServiceWrapperBuilder builder = ServiceWrapperBuilder
46 | .serviceBuilder(input, output, HelloReplier.class, HelloWorldImpl::new)
47 | .inputSourceId(1).outputSourceId(2);
48 |
49 | try (CloseableHelloWorld helloWorld = builder.inputWriter(CloseableHelloWorld.class);
50 | MethodReader replyReader = builder.outputReader(replier);
51 | ServiceWrapper helloWorldService = builder.get()) {
52 |
53 | helloWorld.hello("April");
54 | helloWorld.hello("June");
55 |
56 | System.out.println(helloWorldService.inputQueues()[0].dump());
57 | for (int i = 0; i < 2; i++) {
58 | while (!replyReader.readOne()) {
59 | Thread.yield();
60 | }
61 | }
62 | System.out.println(helloWorldService.outputQueue().dump());
63 | verify(replier);
64 | } finally {
65 | IOTools.deleteDirWithFiles(new File(input), 2);
66 | IOTools.deleteDirWithFiles(new File(output), 2);
67 | }
68 | }
69 |
70 | interface CloseableHelloWorld extends HelloWorld, Closeable {
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/mtm-result-100k.txt:
--------------------------------------------------------------------------------
1 | /opt/jdk1.8.0_66/bin/java -Didea.launcher.port=7534 -Didea.launcher.bin.path=/opt/idea-IC-143.1184.17/bin -Dfile.encoding=UTF-8 -classpath /opt/jdk1.8.0_66/jre/lib/charsets.jar:/opt/jdk1.8.0_66/jre/lib/deploy.jar:/opt/jdk1.8.0_66/jre/lib/ext/cldrdata.jar:/opt/jdk1.8.0_66/jre/lib/ext/dnsns.jar:/opt/jdk1.8.0_66/jre/lib/ext/jaccess.jar:/opt/jdk1.8.0_66/jre/lib/ext/jfxrt.jar:/opt/jdk1.8.0_66/jre/lib/ext/localedata.jar:/opt/jdk1.8.0_66/jre/lib/ext/nashorn.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunec.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunjce_provider.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunpkcs11.jar:/opt/jdk1.8.0_66/jre/lib/ext/zipfs.jar:/opt/jdk1.8.0_66/jre/lib/javaws.jar:/opt/jdk1.8.0_66/jre/lib/jce.jar:/opt/jdk1.8.0_66/jre/lib/jfr.jar:/opt/jdk1.8.0_66/jre/lib/jfxswt.jar:/opt/jdk1.8.0_66/jre/lib/jsse.jar:/opt/jdk1.8.0_66/jre/lib/management-agent.jar:/opt/jdk1.8.0_66/jre/lib/plugin.jar:/opt/jdk1.8.0_66/jre/lib/resources.jar:/opt/jdk1.8.0_66/jre/lib/rt.jar:/home/peter/OpenHFT/Microservices/target/test-classes:/home/peter/OpenHFT/Microservices/target/classes:/home/peter/OpenHFT/Chronicle-Queue/target/classes:/home/peter/OpenHFT/Chronicle-Wire/target/classes:/home/peter/.m2/repository/net/openhft/chronicle-bytes/1.4.0/chronicle-bytes-1.4.0.jar:/home/peter/.m2/repository/org/xerial/snappy/snappy-java/1.1.2.1/snappy-java-1.1.2.1.jar:/home/peter/.m2/repository/com/intellij/annotations/12.0/annotations-12.0.jar:/home/peter/OpenHFT/Chronicle-Threads/target/classes:/home/peter/.m2/repository/net/openhft/affinity/3.0.5/affinity-3.0.5.jar:/home/peter/.m2/repository/net/java/dev/jna/jna/4.2.1/jna-4.2.1.jar:/home/peter/.m2/repository/net/java/dev/jna/jna-platform/4.2.1/jna-platform-4.2.1.jar:/home/peter/OpenHFT/Chronicle-Core/target/classes:/home/peter/.m2/repository/org/slf4j/slf4j-api/1.7.14/slf4j-api-1.7.14.jar:/home/peter/.m2/repository/org/openjdk/jmh/jmh-core/1.11.3/jmh-core-1.11.3.jar:/home/peter/.m2/repository/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar:/home/peter/.m2/repository/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar:/home/peter/.m2/repository/org/openjdk/jmh/jmh-generator-annprocess/1.11.3/jmh-generator-annprocess-1.11.3.jar:/home/peter/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/peter/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/peter/.m2/repository/org/easymock/easymock/3.4/easymock-3.4.jar:/home/peter/.m2/repository/org/objenesis/objenesis/2.2/objenesis-2.2.jar:/home/peter/.m2/repository/org/slf4j/slf4j-simple/1.7.14/slf4j-simple-1.7.14.jar:/opt/idea-IC-143.1184.17/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain net.openhft.samples.microservices.MultiThreadedMain
2 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 7 to Thread[stage3 to pathOut,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 3 to Thread[stage2 to stage3,5,main]
4 | [pathIn to stage2] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[pathIn to stage2,5,main]
5 | [main] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 1.167s)
8 | Pausing after warmup for 500ms
9 | 100000, 99999, 99999, 99999
10 | 200000, 199999, 199999, 199999
11 | 300000, 299999, 299999, 299999
12 | 400000, 399999, 399999, 399999
13 | 500000, 499999, 499999, 499999
14 | 600000, 599999, 599999, 599999
15 | 700000, 699999, 699999, 699999
16 | 800000, 799999, 799999, 799999
17 | 900000, 899999, 899999, 899999
18 | 1000000, 999999, 999999, 999999
19 | 1100000, 1099999, 1099999, 1099999
20 | 1200000, 1199999, 1199999, 1199999
21 | 1300000, 1299999, 1299999, 1299999
22 | 1400000, 1399999, 1399999, 1399999
23 | 1500000, 1499999, 1499999, 1499999
24 | 1600000, 1599999, 1599999, 1599999
25 | 1700000, 1699999, 1699999, 1699999
26 | 1800000, 1799999, 1799999, 1799999
27 | 1900000, 1899999, 1899999, 1899999
28 | 2000000, 1999999, 1999999, 1999999
29 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
30 | Run time: 20.0s
31 | Correcting for co-ordinated:true
32 | Target throughput:100000/s = 1 message every 10us
33 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.2 / 6.3 8.4 / 14,420 28,840 / 30,930 - 30,930
34 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 1,610 15,990 / 17,300 - 17,300
35 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 11,800 11,800 / 12,320 - 12,320
36 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.9 / 2.1 4.2 / 1,670 1,740 / 1,740 - 1,740
37 | OS Jitter (10,535) 50/90 99/99.9 99.99 - worst was 1.1 / 7.6 14 / 92 3,470 - 3,870
38 | -------------------------------------------------------------------------------------------------------------------
39 | 2100000, 2099999, 2099999, 2099999
40 | 2200000, 2199999, 2199999, 2199999
41 | 2300000, 2299999, 2299999, 2299999
42 | 2400000, 2399999, 2399999, 2399999
43 | 2500000, 2499999, 2499999, 2499999
44 | 2600000, 2599999, 2599999, 2599999
45 | 2700000, 2699999, 2699999, 2699999
46 | 2800000, 2799999, 2799999, 2799999
47 | 2900000, 2899999, 2899999, 2899999
48 | 3000000, 2999999, 2999999, 2999999
49 | 3100000, 3099999, 3099999, 3099999
50 | 3200000, 3199999, 3199999, 3199999
51 | 3300000, 3299999, 3299999, 3299999
52 | 3400000, 3399999, 3399999, 3399999
53 | 3500000, 3499999, 3499999, 3499999
54 | 3600000, 3599999, 3599999, 3599999
55 | 3700000, 3699999, 3699999, 3699999
56 | 3800000, 3799999, 3799999, 3799999
57 | 3900000, 3899999, 3899999, 3899999
58 | 4000000, 3999999, 3999999, 3999999
59 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
60 | Run time: 20.0s
61 | Correcting for co-ordinated:true
62 | Target throughput:100000/s = 1 message every 10us
63 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.1 / 10 934 / 2,290 - 2,420
64 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 4.5 901 / 2,290 - 2,420
65 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 5.0 14 / 62 - 160
66 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.9 / 2.0 4.2 / 5.2 12 / 113 - 168
67 | OS Jitter (5,114) 50/90 99/99.9 99.99 - worst was 1.1 / 1.7 10.0 / 11 129 - 129
68 | -------------------------------------------------------------------------------------------------------------------
69 | 4100000, 4099999, 4099999, 4099999
70 | 4200000, 4199999, 4199999, 4199999
71 | 4300000, 4299999, 4299999, 4299999
72 | 4400000, 4399999, 4399999, 4399999
73 | 4500000, 4499999, 4499999, 4499999
74 | 4600000, 4599999, 4599999, 4599999
75 | 4700000, 4699999, 4699999, 4699999
76 | 4800000, 4799999, 4799999, 4799999
77 | 4900000, 4899999, 4899999, 4899999
78 | 5000000, 4999999, 4999999, 4999999
79 | 5100000, 5099999, 5099999, 5099999
80 | 5200000, 5199999, 5199999, 5199999
81 | 5300000, 5299999, 5299999, 5299999
82 | 5400000, 5399999, 5399999, 5399999
83 | 5500000, 5499999, 5499999, 5499999
84 | 5600000, 5599999, 5599999, 5599999
85 | 5700000, 5699999, 5699999, 5699999
86 | 5800000, 5799999, 5799999, 5799999
87 | 5900000, 5899999, 5899999, 5899999
88 | 6000000, 5999999, 5999999, 5999999
89 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
90 | Run time: 20.0s
91 | Correcting for co-ordinated:true
92 | Target throughput:100000/s = 1 message every 10us
93 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.4 / 10 36 / 176 - 242
94 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 4.2 6.5 / 68 - 135
95 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 3.6 / 4.5 7.0 / 84 - 168
96 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.2 9.0 / 121 - 242
97 | OS Jitter (4,759) 50/90 99/99.9 99.99 - worst was 1.1 / 1.5 3.4 / 68 125 - 125
98 | -------------------------------------------------------------------------------------------------------------------
99 | 6100000, 6099999, 6099999, 6099999
100 | 6200000, 6199999, 6199999, 6199999
101 | 6300000, 6299999, 6299999, 6299999
102 | 6400000, 6399999, 6399999, 6399999
103 | 6500000, 6499999, 6499999, 6499999
104 | 6600000, 6599999, 6599999, 6599999
105 | 6700000, 6699999, 6699999, 6699999
106 | 6800000, 6799999, 6799999, 6799999
107 | 6900000, 6899999, 6899999, 6899999
108 | 7000000, 6999999, 6999999, 6999999
109 | 7100000, 7099999, 7099999, 7099999
110 | 7200000, 7199999, 7199999, 7199999
111 | 7300000, 7299999, 7299999, 7299999
112 | 7400000, 7399999, 7399999, 7399999
113 | 7500000, 7499999, 7499999, 7499999
114 | 7600000, 7599999, 7599999, 7599999
115 | 7700000, 7699999, 7699999, 7699999
116 | 7800000, 7799999, 7799999, 7799999
117 | 7900000, 7899999, 7899999, 7899999
118 | 8000000, 7999999, 7999999, 7999999
119 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
120 | Run time: 20.0s
121 | Correcting for co-ordinated:true
122 | Target throughput:100000/s = 1 message every 10us
123 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.4 / 10 14 / 143 - 209
124 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 3.9 6.0 / 38 - 109
125 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 3.6 / 4.7 6.8 / 62 - 143
126 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.2 7.8 / 104 - 201
127 | OS Jitter (4,069) 50/90 99/99.9 99.99 - worst was 1.1 / 1.4 3.1 / 5.8 56 - 56
128 | -------------------------------------------------------------------------------------------------------------------
129 | 8100000, 8099999, 8099999, 8099999
130 | 8200000, 8199999, 8199999, 8199999
131 | 8300000, 8299999, 8299999, 8299999
132 | 8400000, 8399999, 8399999, 8399999
133 | 8500000, 8499999, 8499999, 8499999
134 | 8600000, 8599999, 8599999, 8599999
135 | 8700000, 8699999, 8699999, 8699999
136 | 8800000, 8799998, 8799999, 8799999
137 | 8900000, 8899998, 8899999, 8899999
138 | 9000000, 8999999, 8999999, 8999999
139 | 9100000, 9099999, 9099999, 9099999
140 | 9200000, 9199999, 9199999, 9199999
141 | 9300000, 9299999, 9299999, 9299999
142 | 9400000, 9399999, 9399999, 9399999
143 | 9500000, 9499998, 9499999, 9499999
144 | 9600000, 9599998, 9599999, 9599999
145 | 9700000, 9699998, 9699999, 9699999
146 | 9800000, 9799999, 9799999, 9799999
147 | 9900000, 9899998, 9899999, 9899999
148 | 10000000, 9999998, 9999999, 9999999
149 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
150 | Run time: 20.0s
151 | Correcting for co-ordinated:true
152 | Target throughput:100000/s = 1 message every 10us
153 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.4 / 10 13 / 135 - 193
154 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 3.8 5.8 / 27 - 92
155 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 3.6 / 4.5 6.5 / 100 - 193
156 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.2 7.6 / 60 - 184
157 | OS Jitter (5,055) 50/90 99/99.9 99.99 - worst was 1.1 / 1.5 3.1 / 5.8 62 - 62
158 | -------------------------------------------------------------------------------------------------------------------
159 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
160 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
161 | 50: 5.25 5.50 5.50 5.50 5.50 0.00 12.44
162 | 90: 6.27 6.27 6.27 6.27 6.27 0.00 12.78
163 | 99: 8.45 8.06 8.45 8.45 8.45 3.08 13.62
164 | 99.9: 14417.92 10.50 10.50 10.50 10.50 0.00 11.48
165 | 99.99: 28835.84 933.89 35.84 13.57 12.54 98.00 16.52
166 | worst: 30932.99 2424.83 241.66 208.90 192.51 88.55 24.37
167 | -------------------------------------------------------------------------------------------------------------------
168 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
169 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
170 | 50: 1.06 1.06 1.06 1.12 1.12 3.88 8.19
171 | 90: 1.25 1.18 1.18 1.18 1.18 0.00 8.34
172 | 99: 2.88 2.88 2.88 2.88 2.88 0.00 10.61
173 | 99.9: 1605.63 4.48 4.22 3.90 3.78 11.06 9.30
174 | 99.99: 15990.78 901.12 6.53 6.02 5.76 99.04 14.31
175 | worst: 17301.50 2424.83 135.17 108.54 92.16 94.41 22.64
176 | -------------------------------------------------------------------------------------------------------------------
177 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
178 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
179 | 50: 1.63 1.63 1.70 1.70 1.70 2.55 9.24
180 | 90: 1.82 1.82 1.82 1.82 1.82 0.00 9.43
181 | 99: 3.65 3.65 3.65 3.65 3.65 0.00 11.25
182 | 99.9: 11796.48 4.99 4.48 4.74 4.48 7.08 9.57
183 | 99.99: 11796.48 13.57 7.04 6.78 6.53 41.83 10.84
184 | worst: 12320.77 159.74 167.94 143.36 192.51 18.60 20.89
185 | -------------------------------------------------------------------------------------------------------------------
186 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
187 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
188 | 50: 1.89 1.89 1.95 1.95 1.95 2.21 9.59
189 | 90: 2.11 2.02 2.11 2.11 2.11 3.08 9.76
190 | 99: 4.22 4.22 4.22 4.22 4.22 0.00 11.65
191 | 99.9: 1671.17 5.25 5.25 5.25 5.25 0.00 9.91
192 | 99.99: 1736.70 12.03 8.96 7.81 7.55 28.34 11.34
193 | worst: 1736.70 167.94 241.66 200.70 184.32 22.64 22.96
194 | -------------------------------------------------------------------------------------------------------------------
195 |
196 | Process finished with exit code 0
197 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/mtm-result-200k.txt:
--------------------------------------------------------------------------------
1 | /opt/jdk1.8.0_66/bin/java -Didea.launcher.port=7535 -Didea.launcher.bin.path=/opt/idea-IC-143.1184.17/bin -Dfile.encoding=UTF-8 -classpath /opt/jdk1.8.0_66/jre/lib/charsets.jar:/opt/jdk1.8.0_66/jre/lib/deploy.jar:/opt/jdk1.8.0_66/jre/lib/ext/cldrdata.jar:/opt/jdk1.8.0_66/jre/lib/ext/dnsns.jar:/opt/jdk1.8.0_66/jre/lib/ext/jaccess.jar:/opt/jdk1.8.0_66/jre/lib/ext/jfxrt.jar:/opt/jdk1.8.0_66/jre/lib/ext/localedata.jar:/opt/jdk1.8.0_66/jre/lib/ext/nashorn.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunec.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunjce_provider.jar:/opt/jdk1.8.0_66/jre/lib/ext/sunpkcs11.jar:/opt/jdk1.8.0_66/jre/lib/ext/zipfs.jar:/opt/jdk1.8.0_66/jre/lib/javaws.jar:/opt/jdk1.8.0_66/jre/lib/jce.jar:/opt/jdk1.8.0_66/jre/lib/jfr.jar:/opt/jdk1.8.0_66/jre/lib/jfxswt.jar:/opt/jdk1.8.0_66/jre/lib/jsse.jar:/opt/jdk1.8.0_66/jre/lib/management-agent.jar:/opt/jdk1.8.0_66/jre/lib/plugin.jar:/opt/jdk1.8.0_66/jre/lib/resources.jar:/opt/jdk1.8.0_66/jre/lib/rt.jar:/home/peter/OpenHFT/Microservices/target/test-classes:/home/peter/OpenHFT/Microservices/target/classes:/home/peter/OpenHFT/Chronicle-Queue/target/classes:/home/peter/OpenHFT/Chronicle-Wire/target/classes:/home/peter/.m2/repository/net/openhft/chronicle-bytes/1.4.0/chronicle-bytes-1.4.0.jar:/home/peter/.m2/repository/org/xerial/snappy/snappy-java/1.1.2.1/snappy-java-1.1.2.1.jar:/home/peter/.m2/repository/com/intellij/annotations/12.0/annotations-12.0.jar:/home/peter/OpenHFT/Chronicle-Threads/target/classes:/home/peter/.m2/repository/net/openhft/affinity/3.0.5/affinity-3.0.5.jar:/home/peter/.m2/repository/net/java/dev/jna/jna/4.2.1/jna-4.2.1.jar:/home/peter/.m2/repository/net/java/dev/jna/jna-platform/4.2.1/jna-platform-4.2.1.jar:/home/peter/OpenHFT/Chronicle-Core/target/classes:/home/peter/.m2/repository/org/slf4j/slf4j-api/1.7.14/slf4j-api-1.7.14.jar:/home/peter/.m2/repository/org/openjdk/jmh/jmh-core/1.11.3/jmh-core-1.11.3.jar:/home/peter/.m2/repository/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar:/home/peter/.m2/repository/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar:/home/peter/.m2/repository/org/openjdk/jmh/jmh-generator-annprocess/1.11.3/jmh-generator-annprocess-1.11.3.jar:/home/peter/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/peter/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/peter/.m2/repository/org/easymock/easymock/3.4/easymock-3.4.jar:/home/peter/.m2/repository/org/objenesis/objenesis/2.2/objenesis-2.2.jar:/home/peter/.m2/repository/org/slf4j/slf4j-simple/1.7.14/slf4j-simple-1.7.14.jar:/opt/idea-IC-143.1184.17/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain net.openhft.samples.microservices.MultiThreadedMain
2 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 7 to Thread[stage3 to pathOut,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 3 to Thread[stage2 to stage3,5,main]
4 | [pathIn to stage2] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[pathIn to stage2,5,main]
5 | [main] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 1.22s)
8 | Pausing after warmup for 500ms
9 | 100000, 99999, 99999, 99999
10 | 200000, 199999, 199999, 199999
11 | 300000, 299999, 299999, 299999
12 | 400000, 399999, 399999, 399999
13 | 500000, 499999, 499999, 499999
14 | 600000, 599999, 599999, 599999
15 | 700000, 699999, 699999, 699999
16 | 800000, 799999, 799999, 799999
17 | 900000, 899999, 899999, 899999
18 | 1000000, 999999, 999999, 999999
19 | 1100000, 1099999, 1099999, 1099999
20 | 1200000, 1199999, 1199999, 1199999
21 | 1300000, 1299999, 1299999, 1299999
22 | 1400000, 1399999, 1399999, 1399999
23 | 1500000, 1499999, 1499999, 1499999
24 | 1600000, 1599999, 1599999, 1599999
25 | 1700000, 1699999, 1699999, 1699999
26 | 1800000, 1799999, 1799999, 1799999
27 | 1900000, 1899999, 1899999, 1899999
28 | 2000000, 1999999, 1999999, 1999999
29 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
30 | Run time: 10.0s
31 | Correcting for co-ordinated:true
32 | Target throughput:200000/s = 1 message every 5us
33 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.2 / 6.3 9.5 / 11,270 15,990 / 16,520 - 16,520
34 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.4 2.9 / 868 3,080 / 3,340 - 3,340
35 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 8,260 12,320 / 12,320 - 12,320
36 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.9 / 2.0 4.2 / 3,080 3,340 / 3,470 - 3,470
37 | OS Jitter (7,218) 50/90 99/99.9 99.99 - worst was 1.5 / 10.0 27 / 1,340 5,900 - 5,900
38 | -------------------------------------------------------------------------------------------------------------------
39 | 2100000, 2099999, 2099999, 2099999
40 | 2200000, 2199999, 2199999, 2199999
41 | 2300000, 2299999, 2299999, 2299999
42 | 2400000, 2399999, 2399999, 2399999
43 | 2500000, 2499999, 2499999, 2499999
44 | 2600000, 2599999, 2599999, 2599999
45 | 2700000, 2699999, 2699999, 2699999
46 | 2800000, 2799999, 2799999, 2799999
47 | 2900000, 2899999, 2899999, 2899999
48 | 3000000, 2999999, 2999999, 2999999
49 | 3100000, 3099999, 3099999, 3099999
50 | 3200000, 3199999, 3199999, 3199999
51 | 3300000, 3299999, 3299999, 3299999
52 | 3400000, 3399999, 3399999, 3399999
53 | 3500000, 3499999, 3499999, 3499999
54 | 3600000, 3599999, 3599999, 3599999
55 | 3700000, 3699999, 3699999, 3699999
56 | 3800000, 3799999, 3799999, 3799999
57 | 3900000, 3899999, 3899999, 3899999
58 | 4000000, 3999999, 3999999, 3999999
59 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
60 | Run time: 10.0s
61 | Correcting for co-ordinated:true
62 | Target throughput:200000/s = 1 message every 5us
63 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 6.5 8.4 / 11 117 / 193 - 225
64 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.3 2.9 / 4.5 23 / 104 - 152
65 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 3.6 / 5.2 28 / 113 - 184
66 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.5 40 / 168 - 193
67 | OS Jitter (2,977) 50/90 99/99.9 99.99 - worst was 1.2 / 2.0 5.0 / 22 92 - 92
68 | -------------------------------------------------------------------------------------------------------------------
69 | 4100000, 4099999, 4099999, 4099999
70 | 4200000, 4199999, 4199999, 4199999
71 | 4300000, 4299999, 4299999, 4299999
72 | 4400000, 4399999, 4399999, 4399999
73 | 4500000, 4499999, 4499999, 4499999
74 | 4600000, 4599999, 4599999, 4599999
75 | 4700000, 4699999, 4699999, 4699999
76 | 4800000, 4799999, 4799999, 4799999
77 | 4900000, 4899999, 4899999, 4899999
78 | 5000000, 4999999, 4999999, 4999999
79 | 5100000, 5099999, 5099999, 5099999
80 | 5200000, 5199999, 5199999, 5199999
81 | 5300000, 5299999, 5299999, 5299999
82 | 5400000, 5399999, 5399999, 5399999
83 | 5500000, 5499999, 5499999, 5499999
84 | 5600000, 5599999, 5599999, 5599999
85 | 5700000, 5699999, 5699999, 5699999
86 | 5800000, 5799999, 5799999, 5799999
87 | 5900000, 5899999, 5899999, 5899999
88 | 6000000, 5999999, 5999999, 5999999
89 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
90 | Run time: 10.0s
91 | Correcting for co-ordinated:true
92 | Target throughput:200000/s = 1 message every 5us
93 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 6.5 8.4 / 12 606 / 1,080 - 1,150
94 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 4.7 38 / 100 - 160
95 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 3.8 / 5.5 40 / 160 - 201
96 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 6.5 606 / 967 - 967
97 | OS Jitter (4,208) 50/90 99/99.9 99.99 - worst was 1.2 / 1.9 3.4 / 68 143 - 143
98 | -------------------------------------------------------------------------------------------------------------------
99 | 6100000, 6099999, 6099999, 6099999
100 | 6200000, 6199999, 6199999, 6199999
101 | 6300000, 6299999, 6299999, 6299999
102 | 6400000, 6399999, 6399999, 6399999
103 | 6500000, 6499999, 6499999, 6499999
104 | 6600000, 6599999, 6599999, 6599999
105 | 6700000, 6699999, 6699999, 6699999
106 | 6800000, 6799999, 6799999, 6799999
107 | 6900000, 6899999, 6899999, 6899999
108 | 7000000, 6999999, 6999999, 6999999
109 | 7100000, 7099999, 7099999, 7099999
110 | 7200000, 7199999, 7199999, 7199999
111 | 7300000, 7299999, 7299999, 7299999
112 | 7400000, 7399999, 7399999, 7399999
113 | 7500000, 7499999, 7499999, 7499999
114 | 7600000, 7599999, 7599999, 7599999
115 | 7700000, 7699999, 7699999, 7699999
116 | 7800000, 7799999, 7799999, 7799999
117 | 7900000, 7899999, 7899999, 7899999
118 | 8000000, 7999999, 7999999, 7999999
119 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
120 | Run time: 10.0s
121 | Correcting for co-ordinated:true
122 | Target throughput:200000/s = 1 message every 5us
123 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 6.5 8.4 / 11 129 / 225 - 250
124 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 4.2 20 / 92 - 168
125 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.8 / 1.9 3.8 / 5.0 58 / 143 - 168
126 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 6.0 72 / 135 - 250
127 | OS Jitter (3,898) 50/90 99/99.9 99.99 - worst was 1.2 / 1.9 3.3 / 7.6 60 - 60
128 | -------------------------------------------------------------------------------------------------------------------
129 | 8100000, 8099999, 8099999, 8099999
130 | 8200000, 8199999, 8199999, 8199999
131 | 8300000, 8299999, 8299999, 8299999
132 | 8400000, 8399999, 8399999, 8399999
133 | 8500000, 8499999, 8499999, 8499999
134 | 8600000, 8599998, 8599999, 8599999
135 | 8700000, 8699998, 8699999, 8699999
136 | 8800000, 8799998, 8799998, 8799998
137 | 8900000, 8899999, 8899998, 8899998
138 | 9000000, 8999998, 8999998, 8999998
139 | 9100000, 9099998, 9099998, 9099998
140 | 9200000, 9199999, 9199998, 9199998
141 | 9300000, 9299998, 9299998, 9299998
142 | 9400000, 9399998, 9399998, 9399998
143 | 9500000, 9499998, 9499998, 9499998
144 | 9600000, 9599998, 9599998, 9599998
145 | 9700000, 9699998, 9699998, 9699998
146 | 9800000, 9799998, 9799998, 9799998
147 | 9900000, 9899998, 9899998, 9899998
148 | 10000000, 9999998, 9999999, 9999999
149 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
150 | Run time: 10.0s
151 | Correcting for co-ordinated:true
152 | Target throughput:200000/s = 1 message every 5us
153 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 6.5 8.4 / 10 80 / 168 - 209
154 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.1 / 1.2 2.9 / 4.2 6.8 / 50 - 84
155 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.8 / 1.9 3.6 / 5.0 17 / 117 - 160
156 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.5 38 / 121 - 209
157 | OS Jitter (5,584) 50/90 99/99.9 99.99 - worst was 1.1 / 1.4 2.2 / 6.5 62 - 62
158 | -------------------------------------------------------------------------------------------------------------------
159 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
160 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
161 | 50: 5.25 5.76 5.76 5.76 5.76 0.00 12.60
162 | 90: 6.27 6.53 6.53 6.53 6.53 0.00 12.93
163 | 99: 9.47 8.45 8.45 8.45 8.45 0.00 13.59
164 | 99.9: 11272.19 11.01 12.03 11.01 10.50 8.89 11.65
165 | 99.99: 15990.78 116.74 606.21 129.02 79.87 81.46 20.85
166 | worst: 16515.07 225.28 1146.88 249.86 208.90 74.96 24.01
167 | -------------------------------------------------------------------------------------------------------------------
168 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
169 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
170 | 50: 1.06 1.12 1.12 1.12 1.12 0.00 8.27
171 | 90: 1.38 1.31 1.25 1.25 1.25 3.31 8.48
172 | 99: 2.88 2.88 2.88 2.88 2.88 0.00 10.61
173 | 99.9: 868.35 4.48 4.74 4.22 4.22 7.48 9.57
174 | 99.99: 3080.19 23.04 37.89 19.97 6.78 75.35 13.46
175 | worst: 3342.34 151.55 159.74 167.94 83.97 40.00 20.85
176 | -------------------------------------------------------------------------------------------------------------------
177 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
178 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
179 | 50: 1.63 1.70 1.70 1.76 1.76 2.45 9.32
180 | 90: 1.82 1.89 1.89 1.89 1.89 0.00 9.53
181 | 99: 3.65 3.65 3.78 3.78 3.65 2.29 11.30
182 | 99.9: 8257.54 5.25 5.50 4.99 4.99 6.40 9.78
183 | 99.99: 12320.77 28.16 39.94 58.37 16.90 62.07 14.84
184 | worst: 12320.77 184.32 200.70 167.94 159.74 14.60 21.20
185 | -------------------------------------------------------------------------------------------------------------------
186 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
187 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
188 | 50: 1.89 1.95 1.95 2.02 2.02 2.14 9.67
189 | 90: 2.02 2.11 2.11 2.11 2.11 0.00 9.83
190 | 99: 4.22 4.22 4.22 4.22 4.22 0.00 11.65
191 | 99.9: 3080.19 5.50 6.53 6.02 5.50 11.03 10.12
192 | 99.99: 3342.34 39.94 606.21 71.68 37.89 90.91 19.34
193 | worst: 3473.41 192.51 966.66 249.86 208.90 72.83 24.72
194 | -------------------------------------------------------------------------------------------------------------------
195 |
196 | Process finished with exit code 0
197 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/mtm-result-50k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 7 to Thread[pathIn to stage2,5,main]
2 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 3 to Thread[stage2 to stage3,5,main]
3 | [stage3 to pathOut] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[stage3 to pathOut,5,main]
4 | [main] WARN net.openhft.affinity.LockInventory - No reservable CPU for Thread[main,5,main]
5 | Complete: 50000
6 | Warm up complete (50000 iterations took 1.337s)
7 | Pausing after warmup for 500ms
8 | 100000, 99999, 99999, 99999
9 | 200000, 199999, 199999, 199999
10 | 300000, 299999, 299999, 299999
11 | 400000, 399999, 399999, 399999
12 | 500000, 499999, 499999, 499999
13 | 600000, 599999, 599999, 599999
14 | 700000, 699999, 699999, 699999
15 | 800000, 799999, 799999, 799999
16 | 900000, 899999, 899999, 899999
17 | 1000000, 999999, 999999, 999999
18 | 1100000, 1099999, 1099999, 1099999
19 | 1200000, 1199999, 1199999, 1199999
20 | 1300000, 1299999, 1299999, 1299999
21 | 1400000, 1399999, 1399999, 1399999
22 | 1500000, 1499999, 1499999, 1499999
23 | 1600000, 1599999, 1599999, 1599999
24 | 1700000, 1699999, 1699999, 1699999
25 | 1800000, 1799999, 1799999, 1799999
26 | 1900000, 1899999, 1899999, 1899999
27 | 2000000, 1999999, 1999999, 1999999
28 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
29 | Run time: 40.0s
30 | Correcting for co-ordinated:true
31 | Target throughput:50000/s = 1 message every 20us
32 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.2 / 6.0 8.4 / 8,000 38,800 / 42,990 - 42,990
33 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 6.5 10,750 / 13,890 - 14,420
34 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.8 / 2.0 4.2 / 135 20,450 / 20,450 - 20,450
35 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.4 / 1.5 3.6 / 8,000 9,180 / 9,180 - 9,180
36 | OS Jitter (13,258) 50/90 99/99.9 99.99 - worst was 1.2 / 8.4 13 / 500 11,270 - 12,320
37 | -------------------------------------------------------------------------------------------------------------------
38 | 2100000, 2099999, 2099999, 2099999
39 | 2200000, 2199999, 2199999, 2199999
40 | 2300000, 2299999, 2299999, 2299999
41 | 2400000, 2399999, 2399999, 2399999
42 | 2500000, 2499999, 2499999, 2499999
43 | 2600000, 2599999, 2599999, 2599999
44 | 2700000, 2699999, 2699999, 2699999
45 | 2800000, 2799999, 2799999, 2799999
46 | 2900000, 2899999, 2899999, 2899999
47 | 3000000, 2999999, 2999999, 2999999
48 | 3100000, 3099999, 3099999, 3099999
49 | 3200000, 3199999, 3199999, 3199999
50 | 3300000, 3299999, 3299999, 3299999
51 | 3400000, 3399999, 3399999, 3399999
52 | 3500000, 3499999, 3499999, 3499999
53 | 3600000, 3599999, 3599999, 3599999
54 | 3700000, 3699999, 3699999, 3699999
55 | 3800000, 3799999, 3799999, 3799999
56 | 3900000, 3899999, 3899999, 3899999
57 | 4000000, 3999999, 3999999, 3999999
58 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
59 | Run time: 40.0s
60 | Correcting for co-ordinated:true
61 | Target throughput:50000/s = 1 message every 20us
62 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.4 / 10 13 / 113 - 201
63 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 4.7 7.0 / 48 - 193
64 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.9 / 2.1 4.2 / 5.2 7.6 / 23 - 152
65 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.4 / 1.5 3.6 / 5.0 7.3 / 31 - 176
66 | OS Jitter (7,850) 50/90 99/99.9 99.99 - worst was 1.1 / 1.4 3.3 / 6.0 176 - 176
67 | -------------------------------------------------------------------------------------------------------------------
68 | 4100000, 4099999, 4099999, 4099999
69 | 4200000, 4199999, 4199999, 4199999
70 | 4300000, 4299999, 4299999, 4299999
71 | 4400000, 4399999, 4399999, 4399999
72 | 4500000, 4499999, 4499999, 4499999
73 | 4600000, 4599999, 4599999, 4599999
74 | 4700000, 4699999, 4699999, 4699999
75 | 4800000, 4799999, 4799999, 4799999
76 | 4900000, 4899999, 4899999, 4899999
77 | 5000000, 4999999, 4999999, 4999999
78 | 5100000, 5099999, 5099999, 5099999
79 | 5200000, 5199999, 5199999, 5199999
80 | 5300000, 5299999, 5299999, 5299999
81 | 5400000, 5399999, 5399999, 5399999
82 | 5500000, 5499999, 5499999, 5499999
83 | 5600000, 5599999, 5599999, 5599999
84 | 5700000, 5699999, 5699999, 5699999
85 | 5800000, 5799999, 5799999, 5799999
86 | 5900000, 5899999, 5899999, 5899999
87 | 6000000, 5999999, 5999999, 5999999
88 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
89 | Run time: 40.0s
90 | Correcting for co-ordinated:true
91 | Target throughput:50000/s = 1 message every 20us
92 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.3 8.4 / 10 13 / 143 - 258
93 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 3.6 / 4.7 7.0 / 68 - 176
94 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.9 / 2.1 4.2 / 5.2 7.6 / 62 - 184
95 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.4 / 1.5 3.6 / 4.7 7.0 / 52 - 258
96 | OS Jitter (8,837) 50/90 99/99.9 99.99 - worst was 1.1 / 1.4 3.1 / 14 184 - 184
97 | -------------------------------------------------------------------------------------------------------------------
98 | 6100000, 6099999, 6099999, 6099999
99 | 6200000, 6199999, 6199999, 6199999
100 | 6300000, 6299999, 6299999, 6299999
101 | 6400000, 6399999, 6399999, 6399999
102 | 6500000, 6499999, 6499999, 6499999
103 | 6600000, 6599999, 6599999, 6599999
104 | 6700000, 6699999, 6699999, 6699999
105 | 6800000, 6799999, 6799999, 6799999
106 | 6900000, 6899999, 6899999, 6899999
107 | 7000000, 6999999, 6999999, 6999999
108 | 7100000, 7099999, 7099999, 7099999
109 | 7200000, 7199999, 7199999, 7199999
110 | 7300000, 7299999, 7299999, 7299999
111 | 7400000, 7399999, 7399999, 7399999
112 | 7500000, 7499999, 7499999, 7499999
113 | 7600000, 7599999, 7599999, 7599999
114 | 7700000, 7699999, 7699999, 7699999
115 | 7800000, 7799999, 7799999, 7799999
116 | 7900000, 7899999, 7899999, 7899999
117 | 8000000, 7999999, 7999999, 7999999
118 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
119 | Run time: 40.0s
120 | Correcting for co-ordinated:true
121 | Target throughput:50000/s = 1 message every 20us
122 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.5 8.4 / 10 13 / 104 - 225
123 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 3.6 / 5.0 6.8 / 18 - 100
124 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.5 7.8 / 20 - 143
125 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.4 / 1.5 3.6 / 5.0 7.3 / 56 - 217
126 | OS Jitter (11,617) 50/90 99/99.9 99.99 - worst was 1.1 / 1.7 5.2 / 13 76 - 80
127 | -------------------------------------------------------------------------------------------------------------------
128 | 8100000, 8099999, 8099999, 8099999
129 | 8200000, 8199999, 8199999, 8199999
130 | 8300000, 8299999, 8299999, 8299999
131 | 8400000, 8399999, 8399999, 8399999
132 | 8500000, 8499999, 8499999, 8499999
133 | 8600000, 8599999, 8599999, 8599999
134 | 8700000, 8699998, 8699999, 8699999
135 | 8800000, 8799998, 8799998, 8799998
136 | 8900000, 8899998, 8899998, 8899998
137 | 9000000, 8999998, 8999998, 8999998
138 | 9100000, 9099998, 9099998, 9099998
139 | 9200000, 9199998, 9199998, 9199998
140 | 9300000, 9299998, 9299998, 9299998
141 | 9400000, 9399998, 9399998, 9399998
142 | 9500000, 9499998, 9499998, 9499998
143 | 9600000, 9599998, 9599998, 9599998
144 | 9700000, 9699998, 9699998, 9699998
145 | 9800000, 9799998, 9799998, 9799998
146 | 9900000, 9899998, 9899998, 9899998
147 | 10000000, 9999998, 9999999, 9999999
148 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
149 | Run time: 40.0s
150 | Correcting for co-ordinated:true
151 | Target throughput:50000/s = 1 message every 20us
152 | End to End: (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 6.5 8.4 / 483 8,000 / 11,270 - 11,270
153 | Service 2 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 3.8 / 5.0 6.8 / 18 - 168
154 | Service 3 (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 2.0 / 2.1 4.2 / 5.5 7.6 / 28 - 143
155 | Service Out (2,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.4 / 1.5 3.8 / 467 8,000 / 11,270 - 11,270
156 | OS Jitter (9,758) 50/90 99/99.9 99.99 - worst was 1.1 / 1.4 4.7 / 32 6,680 - 6,680
157 | -------------------------------------------------------------------------------------------------------------------
158 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
159 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
160 | 50: 5.25 5.50 5.50 5.50 5.50 0.00 12.44
161 | 90: 6.02 6.27 6.27 6.53 6.53 2.65 12.88
162 | 99: 8.45 8.45 8.45 8.45 8.45 0.00 13.67
163 | 99.9: 7995.39 10.50 10.50 10.50 483.33 96.78 14.88
164 | 99.99: 38797.31 13.06 13.06 13.06 7995.39 99.76 18.29
165 | worst: 42991.62 200.70 258.05 225.28 11272.19 97.35 26.50
166 | -------------------------------------------------------------------------------------------------------------------
167 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
168 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
169 | 50: 1.57 1.63 1.63 1.70 1.70 2.55 9.23
170 | 90: 1.76 1.82 1.82 1.89 1.89 2.29 9.50
171 | 99: 3.65 3.65 3.65 3.65 3.78 2.29 11.28
172 | 99.9: 6.53 4.74 4.74 4.99 4.99 3.48 11.85
173 | 99.99: 10747.90 7.04 7.04 6.78 6.78 2.45 10.45
174 | worst: 14417.92 192.51 176.13 100.35 167.94 37.97 20.55
175 | -------------------------------------------------------------------------------------------------------------------
176 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
177 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
178 | 50: 1.76 1.89 1.89 1.95 1.95 2.21 9.61
179 | 90: 1.95 2.11 2.11 2.11 2.11 0.00 9.85
180 | 99: 4.22 4.22 4.22 4.22 4.22 0.00 11.65
181 | 99.9: 135.17 5.25 5.25 5.50 5.50 3.15 10.62
182 | 99.99: 20447.23 7.55 7.55 7.81 7.55 2.21 10.69
183 | worst: 20447.23 151.55 184.32 143.36 143.36 16.00 20.36
184 | -------------------------------------------------------------------------------------------------------------------
185 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
186 | Percentile run1 run2 run3 run4 run5 % Variation var(log)
187 | 50: 1.38 1.44 1.44 1.44 1.44 0.00 8.87
188 | 90: 1.50 1.50 1.50 1.50 1.50 0.00 8.95
189 | 99: 3.65 3.65 3.65 3.65 3.78 2.29 11.28
190 | 99.9: 7995.39 4.99 4.74 4.99 466.94 98.49 13.32
191 | 99.99: 9175.04 7.30 7.04 7.30 7995.39 99.87 17.47
192 | worst: 9175.04 176.13 258.05 217.09 11272.19 97.67 27.43
193 | -------------------------------------------------------------------------------------------------------------------
194 |
195 | Process finished with exit code 0
196 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/ComponentsBenchmark.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.affinity.AffinityLock;
4 | import net.openhft.chronicle.core.Jvm;
5 | import net.openhft.chronicle.core.OS;
6 | import net.openhft.chronicle.core.io.IOTools;
7 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueue;
8 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
9 | import net.openhft.chronicle.wire.MethodReader;
10 | import org.openjdk.jmh.annotations.*;
11 | import org.openjdk.jmh.runner.Runner;
12 | import org.openjdk.jmh.runner.RunnerException;
13 | import org.openjdk.jmh.runner.options.Options;
14 | import org.openjdk.jmh.runner.options.OptionsBuilder;
15 | import org.openjdk.jmh.runner.options.TimeValue;
16 |
17 | import java.io.File;
18 | import java.lang.reflect.InvocationTargetException;
19 | import java.lang.reflect.Method;
20 | import java.util.concurrent.TimeUnit;
21 |
22 | import static org.junit.Assert.assertTrue;
23 |
24 | /**
25 | * Created by Peter on 25/03/2016.
26 | */
27 | @State(Scope.Thread)
28 | public class ComponentsBenchmark {
29 |
30 | SidedPrice sidedPrice = new SidedPrice(null, 0, null, 0, 0);
31 | private File upQueuePath, downQueuePath;
32 | private SingleChronicleQueue upQueue, downQueue;
33 | private SidedMarketDataListener smdWriter;
34 | private MethodReader reader;
35 | private int counter = 0;
36 |
37 | public static void main(String[] args) throws InvocationTargetException, IllegalAccessException, RunnerException {
38 | // String dump = SingleChronicleQueueBuilder.binary("C:\\Users\\peter_2\\AppData\\Local\\Temp\\target\\ComponentsBenchmark-62973098209185").build().dump();
39 | // System.out.println(dump);
40 | // if (true) System.exit(0);
41 | ComponentsBenchmark main = new ComponentsBenchmark();
42 | if (OS.isLinux())
43 | AffinityLock.acquireLock();
44 |
45 | if (Jvm.isFlightRecorder()) {
46 | // -verbose:gc -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=dumponexit=true,filename=myrecording.jfr,settings=profile -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints
47 | System.out.println("Detected Flight Recorder");
48 | main.setup();
49 | long start = System.currentTimeMillis();
50 | while (start + 60e3 > System.currentTimeMillis()) {
51 | for (int i = 0; i < 1000; i++)
52 | main.benchmarkComponents();
53 | }
54 | main.tearDown();
55 |
56 | } else if (Jvm.isDebug()) {
57 | for (int i = 0; i < 10; i++) {
58 | runAll(main, Setup.class);
59 | runAll(main, Benchmark.class);
60 | runAll(main, TearDown.class);
61 | }
62 |
63 | } else {
64 | int time = Boolean.getBoolean("longTest") ? 30 : 3;
65 | System.out.println("measurementTime: " + time + " secs");
66 | Options opt = new OptionsBuilder()
67 | .include(ComponentsBenchmark.class.getSimpleName())
68 | .warmupIterations(8)
69 | .forks(1)
70 | .mode(Mode.SampleTime)
71 | .measurementTime(TimeValue.seconds(time))
72 | .timeUnit(TimeUnit.MICROSECONDS)
73 | .build();
74 |
75 | new Runner(opt).run();
76 | }
77 | }
78 |
79 | static void runAll(ComponentsBenchmark main, Class annotationClass) throws IllegalAccessException, InvocationTargetException {
80 | for (Method m : ComponentsBenchmark.class.getMethods())
81 | if (m.getAnnotation(annotationClass) != null)
82 | m.invoke(main);
83 | }
84 |
85 | @Setup
86 | public void setup() {
87 | String target = OS.TMP;
88 | upQueuePath = new File(target, "ComponentsBenchmark-up-" + System.nanoTime());
89 | upQueue = SingleChronicleQueueBuilder.binary(upQueuePath).build();
90 | smdWriter = upQueue.acquireAppender().methodWriter(SidedMarketDataListener.class);
91 |
92 | downQueuePath = new File(target, "ComponentsBenchmark-down-" + System.nanoTime());
93 | downQueue = SingleChronicleQueueBuilder.binary(downQueuePath).build();
94 | MarketDataListener mdWriter = downQueue.acquireAppender().methodWriter(MarketDataListener.class);
95 |
96 | SidedMarketDataCombiner combiner = new SidedMarketDataCombiner(mdWriter);
97 |
98 | reader = upQueue.createTailer().methodReader(combiner);
99 | System.out.println("up-q " + upQueuePath);
100 | }
101 |
102 | @TearDown
103 | public void tearDown() {
104 | upQueue.close();
105 | downQueue.close();
106 | try {
107 | IOTools.shallowDeleteDirWithFiles(upQueuePath);
108 | IOTools.shallowDeleteDirWithFiles(downQueuePath);
109 | } catch (Exception e) {
110 | }
111 | }
112 |
113 | @Benchmark
114 | public void benchmarkComponents() {
115 | switch (counter++ & 3) {
116 | case 0:
117 | smdWriter.onSidedPrice(sidedPrice.init("EURUSD", 123456789000L, Side.Sell, 1.1172, 1e6));
118 | break;
119 | case 1:
120 | smdWriter.onSidedPrice(sidedPrice.init("EURUSD", 123456789100L, Side.Buy, 1.1160, 1e6));
121 | break;
122 | case 2:
123 | smdWriter.onSidedPrice(sidedPrice.init("EURUSD", 123456789000L, Side.Sell, 1.1172, 2e6));
124 | break;
125 | case 3:
126 | smdWriter.onSidedPrice(sidedPrice.init("EURUSD", 123456789100L, Side.Buy, 1.1160, 2e6));
127 | break;
128 | }
129 | assertTrue(reader.readOne());
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/ComponentsBenchmark.txt:
--------------------------------------------------------------------------------
1 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 31 to Thread[main,5,main]
2 | measurementTime: 3 secs
3 | # JMH 1.11.3 (released 72 days ago)
4 | # VM version: JDK 1.8.0_66, VM 25.66-b17
5 | # VM invoker: /mnt/opt/jdk1.8.0_66/jre/bin/java
6 | # VM options: -verbose:gc -Xmx8g -Xmn4g -Didea.launcher.port=7536 -Didea.launcher.bin.path=/mnt/opt/idea-IC-143.1821.5/bin -Dfile.encoding=UTF-8
7 | # Warmup: 8 iterations, 1 s each
8 | # Measurement: 20 iterations, 3 s each
9 | # Timeout: 10 min per iteration
10 | # Threads: 1 thread, will synchronize iterations
11 | # Benchmark mode: Sampling time
12 | # Benchmark: net.openhft.samples.microservices.ComponentsBenchmark.benchmarkComponents
13 |
14 | # Run progress: 0.00% complete, ETA 00:01:08
15 | # Fork: 1 of 1
16 | # Warmup Iteration 1: up-q /tmp/ComponentsBenchmark-up-45470867971764
17 | n = 6399, mean = 162 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 6, 11, 35, 61, 970, 44014, 87949, 87949 us/op
18 | # Warmup Iteration 2: n = 21106, mean = 22 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 5, 6, 9, 267, 65371, 88080 us/op
19 | # Warmup Iteration 3: n = 18551, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 6, 15, 19, 24 us/op
20 | # Warmup Iteration 4: n = 17681, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 9, 558, 986 us/op
21 | # Warmup Iteration 5: n = 17874, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 11, 25, 45 us/op
22 | # Warmup Iteration 6: n = 19945, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 6, 6, 8, 14, 18, 18 us/op
23 | # Warmup Iteration 7: n = 19909, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 2, 3, 3, 5, 5, 12, 1301, 3805 us/op
24 | # Warmup Iteration 8: n = 10269, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 5, 6, 7, 15, 28, 28 us/op
25 | Iteration 1: n = 30122, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 7, 16, 24 us/op
26 | Iteration 2: n = 29739, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 9, 16, 18 us/op
27 | Iteration 3: n = 29501, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 9, 16, 19 us/op
28 | Iteration 4: n = 29710, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 16, 27 us/op
29 | Iteration 5: n = 29439, mean = 6 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 5, 6, 7, 8, 13, 17, 21, 27 us/op
30 | Iteration 6: n = 29621, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 47, 430 us/op
31 | Iteration 7: n = 29754, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 18, 20 us/op
32 | Iteration 8: n = 29791, mean = 6 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 5, 6, 7, 8, 13, 17, 23, 25 us/op
33 | Iteration 9: n = 29815, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 8, 16, 247 us/op
34 | Iteration 10: n = 29835, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 8, 18, 439 us/op
35 | Iteration 11: n = 29588, mean = 4 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 6, 6, 8, 16, 422, 433 us/op
36 | Iteration 12: n = 29308, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 9, 17, 19 us/op
37 | Iteration 13: n = 28423, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 8, 14, 15 us/op
38 | Iteration 14: n = 28587, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 18, 213 us/op
39 | Iteration 15: n = 28621, mean = 7 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 5, 6, 9, 9, 15, 20, 26, 34 us/op
40 | Iteration 16: n = 28502, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 11, 16, 39 us/op
41 | Iteration 17: n = 29105, mean = 4 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 6, 6, 8, 16, 52, 404 us/op
42 | Iteration 18: n = 29354, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 16, 402 us/op
43 | Iteration 19: n = 29887, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 5, 5, 10, 21, 431 us/op
44 | Iteration 20: n = 29839, mean = 3 us/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 3, 3, 3, 3, 5, 8, 16, 18 us/op
45 |
46 |
47 | Result "benchmarkComponents":
48 | N = 588541
49 | mean = 3.455 ±(99.9%) 0.010 us/op
50 |
51 | Histogram, us/op:
52 | [ 0.000, 50.000) = 588528
53 | [ 50.000, 100.000) = 0
54 | [100.000, 150.000) = 0
55 | [150.000, 200.000) = 1
56 | [200.000, 250.000) = 2
57 | [250.000, 300.000) = 0
58 | [300.000, 350.000) = 0
59 | [350.000, 400.000) = 1
60 | [400.000, 450.000) = 9
61 |
62 | Percentiles, us/op:
63 | p(0.0000) = 2.552 us/op
64 | p(50.0000) = 2.796 us/op
65 | p(90.0000) = 5.600 us/op
66 | p(95.0000) = 5.720 us/op
67 | p(99.0000) = 8.496 us/op
68 | p(99.9000) = 15.232 us/op
69 | p(99.9900) = 19.977 us/op
70 | p(99.9990) = 422.475 us/op
71 | p(99.9999) = 438.784 us/op
72 | p(100.0000) = 438.784 us/op
73 |
74 |
75 | # Run complete. Total time: 00:01:09
76 |
77 | Benchmark Mode Cnt Score Error Units
78 | ComponentsBenchmark.benchmarkComponents sample 588541 3.455 ± 0.010 us/op
79 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/MultiThreadedMain.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.core.io.IOTools;
5 | import net.openhft.chronicle.core.jlbh.JLBH;
6 | import net.openhft.chronicle.core.jlbh.JLBHOptions;
7 | import net.openhft.chronicle.core.jlbh.JLBHTask;
8 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
9 |
10 | import java.util.UUID;
11 |
12 | /**
13 | * Created by peter on 01/04/16.
14 | */
15 | public class MultiThreadedMain {
16 | private static final int THROUGHPUT = Integer.getInteger("message.throughput", 400_000);
17 | private static final int MESSAGE_COUNT = Integer.getInteger("message.count", THROUGHPUT * 120);
18 | private static final boolean ACCOUNT_FOR_COORDINATED_OMMISSION = true;
19 |
20 | public static void main(String[] args) {
21 | JLBHOptions jlbhOptions = new JLBHOptions()
22 | .warmUpIterations(50_000)
23 | .iterations(MESSAGE_COUNT)
24 | .throughput(THROUGHPUT)
25 | .runs(6)
26 | .recordOSJitter(true)
27 | .pauseAfterWarmupMS(500)
28 | .accountForCoordinatedOmmission(ACCOUNT_FOR_COORDINATED_OMMISSION)
29 | .jlbhTask(new MultiThreadedMainTask());
30 | new JLBH(jlbhOptions).start();
31 | }
32 |
33 | static class MultiThreadedMainTask implements JLBHTask {
34 |
35 | int counter = 1;
36 | UUID uuid = UUID.randomUUID();
37 | String queueIn = OS.TMP + "/MultiThreadedMain/" + uuid + "/pathIn";
38 | String queue2 = OS.TMP + "/MultiThreadedMain/" + uuid + "/stage2";
39 | String queue3 = OS.TMP + "/MultiThreadedMain/" + uuid + "/stage3";
40 | String queueOut = OS.TMP + "/MultiThreadedMain/" + uuid + "/pathOut";
41 | private Service serviceIn;
42 | private ServiceWrapper service2, service3, serviceOut;
43 | private SimpleData data = new SimpleData();
44 |
45 | @Override
46 | public void init(JLBH jlbh) {
47 | serviceIn = SingleChronicleQueueBuilder.binary(queueIn).build().createAppender().methodWriter(Service.class);
48 | service2 = new ServiceWrapper<>(queueIn, queue2, new ServiceImpl(jlbh.addProbe("Service 2")));
49 | service3 = new ServiceWrapper<>(queue2, queue3, new ServiceImpl(jlbh.addProbe("Service 3")));
50 | serviceOut = new ServiceWrapper<>(queue3, queueOut, new ServiceImpl(jlbh.addProbe("Service Out"), jlbh));
51 | }
52 |
53 | @Override
54 | public void run(long startTimeNS) {
55 | data.text = "Hello";
56 | data.number = counter++;
57 | data.ts0 = data.ts = System.nanoTime();
58 | serviceIn.simpleCall(data);
59 | }
60 |
61 | @Override
62 | public void complete() {
63 | System.out.println("Cleaning up");
64 | IOTools.deleteDirWithFiles(queueIn, 2);
65 | IOTools.deleteDirWithFiles(queue2, 2);
66 | IOTools.deleteDirWithFiles(queue3, 2);
67 | IOTools.deleteDirWithFiles(queueOut, 2);
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/OrderManagerTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.core.io.IOTools;
5 | import net.openhft.chronicle.queue.RollCycles;
6 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueue;
7 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
8 | import net.openhft.chronicle.wire.MessageHistory;
9 | import net.openhft.chronicle.wire.MethodReader;
10 | import org.junit.Test;
11 |
12 | import java.io.File;
13 |
14 | import static org.easymock.EasyMock.*;
15 | import static org.junit.Assert.*;
16 |
17 | /**
18 | * Created by peter on 24/03/16.
19 | */
20 | public class OrderManagerTest {
21 |
22 | @Test
23 | public void testOnOrderIdea() {
24 | // what we expect to happen
25 | OrderListener listener = createMock(OrderListener.class);
26 | listener.onOrder(new Order("EURUSD", Side.Buy, 1.1167, 1_000_000));
27 | replay(listener);
28 |
29 | // build our scenario
30 | OrderManager orderManager = new OrderManager(listener);
31 | SidedMarketDataCombiner combiner = new SidedMarketDataCombiner(orderManager);
32 |
33 | // events in
34 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1180, 2e6)); // not expected to trigger
35 |
36 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789000L, Side.Sell, 1.1172, 2e6));
37 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1160, 2e6));
38 |
39 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1167, 2e6));
40 |
41 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1165, 1e6)); // expected to trigger
42 |
43 | verify(listener);
44 | }
45 |
46 | @Test
47 | public void testWithQueue() {
48 | File queuePath = new File(OS.TARGET, "testWithQueue-" + System.nanoTime());
49 | try {
50 | try (SingleChronicleQueue queue = SingleChronicleQueueBuilder.binary(queuePath).build()) {
51 | OrderIdeaListener orderManager = queue.acquireAppender().methodWriter(OrderIdeaListener.class, MarketDataListener.class);
52 | SidedMarketDataCombiner combiner = new SidedMarketDataCombiner((MarketDataListener) orderManager);
53 |
54 | // events in
55 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1180, 2e6)); // not expected to trigger
56 |
57 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789000L, Side.Sell, 1.1172, 2e6));
58 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1160, 2e6));
59 |
60 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1167, 2e6));
61 |
62 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1165, 1e6)); // expected to trigger
63 | }
64 |
65 | // what we expect to happen
66 | OrderListener listener = createMock(OrderListener.class);
67 | listener.onOrder(new Order("EURUSD", Side.Buy, 1.1167, 1_000_000));
68 | replay(listener);
69 |
70 | try (SingleChronicleQueue queue = SingleChronicleQueueBuilder.binary(queuePath).build()) {
71 | // build our scenario
72 | OrderManager orderManager = new OrderManager(listener);
73 | MethodReader reader = queue.createTailer().methodReader(orderManager);
74 | for (int i = 0; i < 5; i++)
75 | assertTrue(reader.readOne());
76 |
77 | assertFalse(reader.readOne());
78 | System.out.println(queue.dump());
79 | }
80 |
81 | verify(listener);
82 | } finally {
83 | try {
84 | IOTools.shallowDeleteDirWithFiles(queuePath);
85 | } catch (Exception e) {
86 |
87 | }
88 | }
89 | }
90 |
91 | @Test
92 | public void testWithQueueHistory() {
93 | File queuePath = new File(OS.TARGET, "testWithQueueHistory-" + System.nanoTime());
94 | File queuePath2 = new File(OS.TARGET, "testWithQueueHistory-down-" + System.nanoTime());
95 | try {
96 | try (SingleChronicleQueue out = SingleChronicleQueueBuilder.binary(queuePath).build()) {
97 | OrderIdeaListener orderManager = out.createAppender()
98 | .methodWriterBuilder(OrderIdeaListener.class)
99 | .addInterface(MarketDataListener.class)
100 | .recordHistory(true)
101 | .get();
102 | SidedMarketDataCombiner combiner = new SidedMarketDataCombiner((MarketDataListener) orderManager);
103 |
104 | // events in
105 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1180, 2e6)); // not expected to trigger
106 |
107 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789000L, Side.Sell, 1.1172, 2e6));
108 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1160, 2e6));
109 |
110 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Buy, 1.1167, 2e6));
111 |
112 | orderManager.onOrderIdea(new OrderIdea("strategy1", "EURUSD", Side.Buy, 1.1165, 1e6)); // expected to trigger
113 | }
114 |
115 | try (SingleChronicleQueue in = SingleChronicleQueueBuilder.binary(queuePath)
116 | .sourceId(1)
117 | .build();
118 | SingleChronicleQueue out = SingleChronicleQueueBuilder.binary(queuePath2).build()) {
119 |
120 | OrderListener listener = out.createAppender()
121 | .methodWriterBuilder(OrderListener.class)
122 | .recordHistory(true)
123 | .get();
124 | // build our scenario
125 | OrderManager orderManager = new OrderManager(listener);
126 | MethodReader reader = in.createTailer().methodReader(orderManager);
127 | for (int i = 0; i < 5; i++)
128 | assertTrue(reader.readOne());
129 |
130 | assertFalse(reader.readOne());
131 | System.out.println(out.dump());
132 | }
133 |
134 | try (SingleChronicleQueue in = SingleChronicleQueueBuilder.binary(queuePath2).sourceId(2).build()) {
135 | MethodReader reader = in.createTailer().methodReader((OrderListener) order -> {
136 | MessageHistory x = MessageHistory.get();
137 | // Note: this will have one extra timing, the time it was written to the console.
138 | System.out.println(x);
139 | assertEquals(1, x.sourceId(0));
140 | assertEquals(2, x.sourceId(1));
141 | assertEquals(4, x.timings());
142 | });
143 | assertTrue(reader.readOne());
144 | assertFalse(reader.readOne());
145 | }
146 | } finally {
147 | try {
148 | IOTools.shallowDeleteDirWithFiles(queuePath);
149 | IOTools.shallowDeleteDirWithFiles(queuePath2);
150 | } catch (Exception e) {
151 |
152 | }
153 | }
154 | }
155 |
156 | @Test
157 | public void testRestartingAService() {
158 | File queuePath = new File(OS.TARGET, "testRestartingAService-" + System.nanoTime());
159 | File queuePath2 = new File(OS.TARGET, "testRestartingAService-down-" + System.nanoTime());
160 | try {
161 | try (SingleChronicleQueue out = SingleChronicleQueueBuilder.binary(queuePath)
162 | .rollCycle(RollCycles.TEST_DAILY)
163 | .build()) {
164 | SidedMarketDataListener combiner = out.createAppender()
165 | .methodWriterBuilder(SidedMarketDataListener.class)
166 | .recordHistory(true)
167 | .get();
168 |
169 | combiner.onSidedPrice(new SidedPrice("EURUSD1", 123456789000L, Side.Sell, 1.1172, 2e6));
170 | combiner.onSidedPrice(new SidedPrice("EURUSD2", 123456789100L, Side.Buy, 1.1160, 2e6));
171 |
172 | combiner.onSidedPrice(new SidedPrice("EURUSD3", 123456789100L, Side.Sell, 1.1173, 2.5e6));
173 | combiner.onSidedPrice(new SidedPrice("EURUSD4", 123456789100L, Side.Buy, 1.1167, 1.5e6));
174 | }
175 |
176 | for (int i = 0; i < 4; i++) {
177 | // read one message at a time
178 | try (SingleChronicleQueue in = SingleChronicleQueueBuilder.binary(queuePath)
179 | .sourceId(1)
180 | .build();
181 | SingleChronicleQueue out = SingleChronicleQueueBuilder.binary(queuePath2)
182 | .rollCycle(RollCycles.TEST_DAILY)
183 | .build()) {
184 |
185 | MarketDataListener mdListener = out.createAppender()
186 | .methodWriterBuilder(MarketDataListener.class)
187 | .recordHistory(true)
188 | .get();
189 | SidedMarketDataCombiner combiner = new SidedMarketDataCombiner(mdListener);
190 | MethodReader reader = in.createTailer()
191 | .afterLastWritten(out)
192 | .methodReader(combiner);
193 | assertTrue(reader.readOne());
194 |
195 | System.out.println("OUT:\n" + out.dump());
196 | }
197 | }
198 | } finally {
199 | try {
200 | IOTools.shallowDeleteDirWithFiles(queuePath);
201 | IOTools.shallowDeleteDirWithFiles(queuePath2);
202 | } catch (Exception e) {
203 |
204 | }
205 | }
206 | }
207 | }
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/Service.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 02/04/16.
5 | */
6 | interface Service {
7 | void simpleCall(SimpleData data);
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/ServiceHandler.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | /**
4 | * Created by peter on 01/04/16.
5 | */
6 | public interface ServiceHandler {
7 | void init(O output);
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/ServiceImpl.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.util.NanoSampler;
4 |
5 | /**
6 | * Created by peter on 02/04/16.
7 | */
8 | class ServiceImpl implements Service, ServiceHandler {
9 | private final NanoSampler nanoSampler;
10 | private final NanoSampler endToEnd;
11 | private Service output;
12 |
13 | public ServiceImpl(NanoSampler nanoSampler) {
14 | this(nanoSampler, t -> {
15 | });
16 | }
17 |
18 | public ServiceImpl(NanoSampler nanoSampler, NanoSampler endToEnd) {
19 | this.nanoSampler = nanoSampler;
20 | this.endToEnd = endToEnd;
21 | }
22 |
23 | @Override
24 | public void init(Service output) {
25 | this.output = output;
26 | }
27 |
28 | @Override
29 | public void simpleCall(SimpleData data) {
30 | data.number *= 10;
31 |
32 | long time = System.nanoTime();
33 | nanoSampler.sampleNanos(time - data.ts);
34 | data.ts = time; // the start time for the next stage.
35 |
36 | output.simpleCall(data); // pass the data to the next stage.
37 | endToEnd.sampleNanos(System.nanoTime() - data.ts0);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/ServiceWrapper.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.affinity.AffinityLock;
4 | import net.openhft.chronicle.core.io.Closeable;
5 | import net.openhft.chronicle.core.util.ObjectUtils;
6 | import net.openhft.chronicle.queue.ChronicleQueue;
7 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
8 | import net.openhft.chronicle.threads.LongPauser;
9 | import net.openhft.chronicle.threads.Pauser;
10 | import net.openhft.chronicle.wire.MethodReader;
11 |
12 | import java.io.File;
13 | import java.util.concurrent.TimeUnit;
14 |
15 | /**
16 | * Created by peter on 01/04/16.
17 | */
18 | public class ServiceWrapper implements Runnable, Closeable {
19 | private final ChronicleQueue inputQueue, outputQueue;
20 | private final MethodReader serviceIn;
21 | private final Object serviceOut;
22 | private final Thread thread;
23 | private final Pauser pauser = new LongPauser(1, 100, 500, 10_000, TimeUnit.MICROSECONDS);
24 |
25 | private volatile boolean closed = false;
26 |
27 | public ServiceWrapper(String inputPath, String outputPath, I serviceImpl) {
28 | Class outClass = ObjectUtils.getTypeFor(serviceImpl.getClass(), ServiceHandler.class);
29 |
30 | outputQueue = SingleChronicleQueueBuilder.binary(outputPath).build();
31 | serviceOut = outputQueue.createAppender().methodWriter(outClass);
32 | serviceImpl.init(serviceOut);
33 |
34 | inputQueue = SingleChronicleQueueBuilder.binary(inputPath).build();
35 | serviceIn = inputQueue.createTailer().methodReader(serviceImpl);
36 |
37 | thread = new Thread(this, new File(inputPath).getName() + " to " + new File(outputPath).getName());
38 | thread.setDaemon(true);
39 | thread.start();
40 | }
41 |
42 | @Override
43 | public void run() {
44 | AffinityLock lock = AffinityLock.acquireLock();
45 | try {
46 | while (!closed) {
47 | if (serviceIn.readOne()) {
48 | pauser.reset();
49 | } else {
50 | pauser.pause();
51 | }
52 | }
53 | } finally {
54 | lock.release();
55 | }
56 | }
57 |
58 | @Override
59 | public void close() {
60 | closed = true;
61 | }
62 |
63 | @Override
64 | public boolean isClosed() {
65 | return closed;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/SidedMarketDataCombinerTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.easymock.EasyMock.*;
6 |
7 | /**
8 | * Created by peter on 24/03/16.
9 | */
10 | public class SidedMarketDataCombinerTest {
11 | @Test
12 | public void testOnSidedPrice() {
13 | MarketDataListener listener = createMock(MarketDataListener.class);
14 | listener.onTopOfBookPrice(new TopOfBookPrice("EURUSD", 123456789000L, 1.1167, 1_000_000, Double.NaN, 0));
15 | listener.onTopOfBookPrice(new TopOfBookPrice("EURUSD", 123456789100L, 1.1167, 1_000_000, 1.1172, 2_000_000));
16 | replay(listener);
17 |
18 | SidedMarketDataListener combiner = new SidedMarketDataCombiner(listener);
19 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789000L, Side.Buy, 1.1167, 1e6));
20 | combiner.onSidedPrice(new SidedPrice("EURUSD", 123456789100L, Side.Sell, 1.1172, 2e6));
21 |
22 | verify(listener);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/SidedMarketDataListenerTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.easymock.EasyMock.*;
6 |
7 | /**
8 | * Created by peter on 24/03/16.
9 | */
10 | public class SidedMarketDataListenerTest {
11 | @Test
12 | public void testOnSidedPrice() {
13 | // what we expect to happen
14 | SidedPrice sp = new SidedPrice("Symbol", 123456789000L, Side.Buy, 1.2345, 1_000_000);
15 | SidedMarketDataListener listener = createMock(SidedMarketDataListener.class);
16 | listener.onSidedPrice(sp);
17 | replay(listener);
18 |
19 | // what happens
20 | listener.onSidedPrice(sp);
21 |
22 | // verify we got everything we expected.
23 | verify(listener);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/SidedPriceTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.core.pool.ClassAliasPool;
4 | import net.openhft.chronicle.wire.Marshallable;
5 | import org.junit.Test;
6 |
7 | import static org.junit.Assert.assertEquals;
8 |
9 | /**
10 | * Created by peter on 24/03/16.
11 | */
12 | public class SidedPriceTest {
13 | static {
14 | ClassAliasPool.CLASS_ALIASES.addAlias(Side.class);
15 | ClassAliasPool.CLASS_ALIASES.addAlias(SidedPrice.class);
16 | }
17 |
18 | @Test
19 | public void testToStringEqualsHashCode() {
20 | SidedPrice sp = new SidedPrice("Symbol", 123456789000L, Side.Buy, 1.2345, 1_000_000);
21 | assertEquals("!SidedPrice {\n" +
22 | " symbol: Symbol,\n" +
23 | " timestamp: 123456789000,\n" +
24 | " side: Buy,\n" +
25 | " price: 1.2345,\n" +
26 | " quantity: 1000000.0\n" +
27 | "}\n", sp.toString());
28 | System.out.println(sp);
29 | // from string
30 | SidedPrice sp2 = Marshallable.fromString(sp.toString());
31 | assertEquals(sp2, sp);
32 | assertEquals(sp2.hashCode(), sp.hashCode());
33 | }
34 | }
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/SimpleData.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.AbstractMarshallable;
4 |
5 | /**
6 | * Created by peter on 02/04/16.
7 | */
8 | class SimpleData extends AbstractMarshallable {
9 | String text;
10 | long number;
11 | long ts0, ts;
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/orders/TopOfBookPriceTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.orders;
2 |
3 | import net.openhft.chronicle.wire.Marshallable;
4 | import org.junit.Ignore;
5 | import org.junit.Test;
6 |
7 | import static org.junit.Assert.assertEquals;
8 |
9 | /**
10 | * Created by peter on 24/03/16.
11 | */
12 | public class TopOfBookPriceTest {
13 | /*
14 | static {
15 | ClassAliasPool.CLASS_ALIASES.addAlias(TopOfBookPrice.class);
16 | }
17 | */
18 |
19 | @Test
20 | public void testToStringEqualsHashCode() {
21 | TopOfBookPrice tobp = new TopOfBookPrice("Symbol", 123456789000L, 1.2345, 1_000_000, 1.235, 2_000_000);
22 | assertEquals("!net.openhft.samples.microservices.orders.TopOfBookPrice {\n" +
23 | " symbol: Symbol,\n" +
24 | " timestamp: 123456789000,\n" +
25 | " buyPrice: 1.2345,\n" +
26 | " buyQuantity: 1000000.0,\n" +
27 | " sellPrice: 1.235,\n" +
28 | " sellQuantity: 2000000.0\n" +
29 | "}\n", tobp.toString());
30 |
31 | // from string
32 | TopOfBookPrice topb2 = Marshallable.fromString(tobp.toString());
33 | assertEquals(topb2, tobp);
34 | assertEquals(topb2.hashCode(), tobp.hashCode());
35 | }
36 |
37 | @Ignore("Tests is expected to fail to show what happens for documentation")
38 | @Test
39 | public void testFailing() {
40 | TopOfBookPrice tobp = new TopOfBookPrice("Symbol", 123456789000L, 1.2345, 1_000_000, 1.235, 2_000_000);
41 | TopOfBookPrice tobp2 = new TopOfBookPrice("Symbol", 123456789000L, 1.2345, 1_000_000, 1.236, 2_000_000);
42 |
43 | assertEquals(tobp, tobp2);
44 | }
45 | }
--------------------------------------------------------------------------------
/src/test/java/net/openhft/samples/microservices/riskmonitor/RiskMonitorTest.java:
--------------------------------------------------------------------------------
1 | package net.openhft.samples.microservices.riskmonitor;
2 |
3 | import net.openhft.chronicle.core.OS;
4 | import net.openhft.chronicle.core.UnsafeMemory;
5 | import net.openhft.chronicle.queue.ChronicleQueue;
6 | import net.openhft.chronicle.queue.ExcerptAppender;
7 | import net.openhft.chronicle.queue.ExcerptTailer;
8 | import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
9 | import net.openhft.chronicle.wire.MethodReader;
10 | import net.openhft.chronicle.wire.ValueIn;
11 | import org.junit.Test;
12 | import sun.misc.Unsafe;
13 |
14 | import java.io.IOException;
15 | import java.nio.charset.StandardCharsets;
16 | import java.time.Clock;
17 | import java.time.LocalDateTime;
18 |
19 | import static org.junit.Assert.assertEquals;
20 | import static org.junit.Assert.assertTrue;
21 |
22 | /**
23 | * Created by peter on 13/07/16.
24 | */
25 | public class RiskMonitorTest {
26 | @Test
27 | public void trade() throws IOException {
28 | String path = OS.TARGET + "/deleteme-" + System.nanoTime();
29 |
30 | try (ChronicleQueue queue = SingleChronicleQueueBuilder.binary(path + "/trades").build()) {
31 | final ExcerptAppender appender = queue.acquireAppender();
32 |
33 | // using the method writer interface.
34 | RiskMonitor riskMonitor = appender.methodWriter(RiskMonitor.class);
35 | final LocalDateTime now = LocalDateTime.now(Clock.systemUTC());
36 | riskMonitor.trade(new TradeDetails(now, "GBPUSD", 1.3095, 10e6, Side.Buy, "peter"));
37 |
38 | // writing a self describing message
39 | appender.writeDocument(w -> w.write("trade").marshallable(
40 | m -> m.write("timestamp").dateTime(now)
41 | .write("symbol").text("EURUSD")
42 | .write("price").float64(1.1101)
43 | .write("quantity").float64(15e6)
44 | .write("side").object(Side.class, Side.Sell)
45 | .write("trader").text("peter")));
46 |
47 | // writing just data
48 | appender.writeDocument(w -> w
49 | .getValueOut().int32(0x123456)
50 | .getValueOut().int64(0x999000999000L)
51 | .getValueOut().text("Hello World"));
52 |
53 | // writing raw data
54 | appender.writeBytes(b -> b
55 | .writeByte((byte) 0x12)
56 | .writeInt(0x345678)
57 | .writeLong(0x999000999000L)
58 | .writeUtf8("Hello World"));
59 |
60 | // Unsafe low level
61 | appender.writeBytes(b -> {
62 | long address = b.address(b.writePosition());
63 | Unsafe unsafe = UnsafeMemory.UNSAFE;
64 | unsafe.putByte(address, (byte) 0x12);
65 | address += 1;
66 | unsafe.putInt(address, 0x345678);
67 | address += 4;
68 | unsafe.putLong(address, 0x999000999000L);
69 | address += 8;
70 | byte[] bytes = "Hello World".getBytes(StandardCharsets.ISO_8859_1);
71 | unsafe.putByte(address, (byte) bytes.length);
72 | address++;
73 | unsafe.copyMemory(bytes, Unsafe.ARRAY_BYTE_BASE_OFFSET, null, address, bytes.length);
74 | b.writeSkip(1 + 4 + 8 + 1 + bytes.length);
75 | });
76 |
77 | // dump the content of the queue
78 | System.out.println(queue.dump());
79 |
80 | }
81 |
82 | try (ChronicleQueue queue = SingleChronicleQueueBuilder.binary(path + "/trades").build()) {
83 | final ExcerptTailer tailer = queue.createTailer();
84 |
85 | // reading using method calls
86 | RiskMonitor monitor = System.out::println;
87 | MethodReader reader = tailer.methodReader(monitor);
88 | // read one message
89 | assertTrue(reader.readOne());
90 |
91 | assertTrue(tailer.readDocument(w -> w.read("trade").marshallable(
92 | m -> {
93 | LocalDateTime timestamp = m.read("timestamp").dateTime();
94 | String symbol = m.read("symbol").text();
95 | double price = m.read("price").float64();
96 | double quantity = m.read("quantity").float64();
97 | Side side = m.read("side").object(Side.class);
98 | String trader = m.read("trader").text();
99 | // do something with values.
100 | })));
101 |
102 | assertTrue(tailer.readDocument(w -> {
103 | ValueIn in = w.getValueIn();
104 | int num = in.int32();
105 | long num2 = in.int64();
106 | String text = in.text();
107 | // do something with values
108 | }));
109 |
110 | assertTrue(tailer.readBytes(in -> {
111 | int code = in.readByte();
112 | int num = in.readInt();
113 | long num2 = in.readLong();
114 | String text = in.readUtf8();
115 | assertEquals("Hello World", text);
116 | // do something with values
117 | }));
118 |
119 | assertTrue(tailer.readBytes(b -> {
120 | long address = b.address(b.readPosition());
121 | Unsafe unsafe = UnsafeMemory.UNSAFE;
122 | int code = unsafe.getByte(address);
123 | address++;
124 | int num = unsafe.getInt(address);
125 | address += 4;
126 | long num2 = unsafe.getLong(address);
127 | address += 8;
128 | int length = unsafe.getByte(address);
129 | address++;
130 | byte[] bytes = new byte[length];
131 | unsafe.copyMemory(null, address, bytes, Unsafe.ARRAY_BYTE_BASE_OFFSET, bytes.length);
132 | String text = new String(bytes, StandardCharsets.UTF_8);
133 | assertEquals("Hello World", text);
134 | // do something with values
135 | }));
136 | }
137 | }
138 |
139 | }
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-100k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 31 to Thread[pathIn to stage2,5,main]
2 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[stage3 to pathOut,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage2 to stage3,5,main]
4 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[main,5,main]
5 | Complete: 50000
6 | Warm up complete (50000 iterations took 1.249s)
7 | Pausing after warmup for 500ms
8 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
9 | Run time: 120.0s
10 | Correcting for co-ordinated:true
11 | Target throughput:100000/s = 1 message every 10us
12 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 8.4 12 / 21 10,220 / 17,300 17,300 / 17,300
13 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 13 8,260 / 15,470 15,470 / 15,990
14 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 13 1,080 / 2,000 2,160 / 2,160
15 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 13 1,030 / 3,870 4,000 / 4,000
16 | OS Jitter (196,814) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 88 573 - 1,340
17 | -------------------------------------------------------------------------------------------------------------------
18 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
19 | Run time: 120.0s
20 | Correcting for co-ordinated:true
21 | Target throughput:100000/s = 1 message every 10us
22 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 7.8 12 / 20 250 / 705 901 / 967
23 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.7 4.5 / 10.0 117 / 672 803 / 901
24 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 10 17 / 209 352 / 500
25 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 12 18 / 287 868 / 967
26 | OS Jitter (296,264) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 76 160 - 770
27 | -------------------------------------------------------------------------------------------------------------------
28 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
29 | Run time: 120.0s
30 | Correcting for co-ordinated:true
31 | Target throughput:100000/s = 1 message every 10us
32 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 7.8 11 / 19 176 / 516 737 / 803
33 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.7 4.5 / 9.5 25 / 434 672 / 770
34 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 9.5 17 / 287 385 / 434
35 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 12 21 / 303 401 / 770
36 | OS Jitter (313,774) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 76 369 - 770
37 | -------------------------------------------------------------------------------------------------------------------
38 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
39 | Run time: 120.0s
40 | Correcting for co-ordinated:true
41 | Target throughput:100000/s = 1 message every 10us
42 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 7.6 11 / 20 209 / 516 672 / 705
43 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 1.7 4.5 / 10.0 76 / 500 639 / 705
44 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 11 17 / 225 319 / 541
45 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 13 18 / 225 319 / 541
46 | OS Jitter (357,096) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 76 319 - 672
47 | -------------------------------------------------------------------------------------------------------------------
48 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
49 | Run time: 120.0s
50 | Correcting for co-ordinated:true
51 | Target throughput:100000/s = 1 message every 10us
52 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 7.6 11 / 20 125 / 467 705 / 770
53 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 1.7 4.5 / 10.0 48 / 434 672 / 737
54 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 11 17 / 217 467 / 573
55 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.7 4.7 / 13 18 / 160 287 / 639
56 | OS Jitter (372,074) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 76 160 - 672
57 | -------------------------------------------------------------------------------------------------------------------
58 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
59 | Run time: 120.0s
60 | Correcting for co-ordinated:true
61 | Target throughput:100000/s = 1 message every 10us
62 | End to End: (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 7.6 11 / 20 135 / 467 639 / 672
63 | Service 2 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 1.7 4.5 / 10.0 52 / 451 606 / 672
64 | Service 3 (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 4.7 / 10.0 17 / 184 287 / 352
65 | Service Out (12,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.7 4.7 / 13 18 / 193 303 / 352
66 | OS Jitter (355,495) 50/90 99/99.9 99.99 - worst was 13 / 14 32 / 76 270 - 737
67 | -------------------------------------------------------------------------------------------------------------------
68 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 28 from Thread[main,5,main]
69 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
70 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
71 | 50: 5.50 5.50 5.50 5.25 5.25 5.25 3.15 14.06
72 | 90: 8.45 7.81 7.81 7.55 7.55 7.55 2.21 15.22
73 | 99: 11.52 11.52 11.01 11.01 11.01 11.01 3.01 16.56
74 | 99.9: 20.99 19.97 18.94 19.97 19.97 19.97 3.48 18.65
75 | 99.99: 10223.62 249.86 176.13 208.90 124.93 135.17 40.00 25.03
76 | worst: 17301.50 966.66 802.82 704.51 770.05 671.74 22.64 32.60
77 | -------------------------------------------------------------------------------------------------------------------
78 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
79 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
80 | 50: 1.57 1.57 1.57 1.50 1.50 1.50 2.76 10.26
81 | 90: 1.76 1.70 1.70 1.70 1.70 1.70 0.00 10.55
82 | 99: 4.74 4.48 4.48 4.48 4.48 4.48 0.00 13.47
83 | 99.9: 13.06 9.98 9.47 9.98 9.98 9.98 3.48 15.99
84 | 99.99: 8257.54 116.74 25.09 75.78 48.13 52.22 70.89 20.06
85 | worst: 15990.78 901.12 770.05 704.51 737.28 671.74 18.54 32.48
86 | -------------------------------------------------------------------------------------------------------------------
87 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
88 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
89 | 50: 1.63 1.63 1.57 1.57 1.57 1.57 2.65 10.35
90 | 90: 1.82 1.76 1.76 1.76 1.76 1.76 0.00 10.65
91 | 99: 4.74 4.74 4.74 4.74 4.74 4.74 0.00 13.69
92 | 99.9: 12.54 10.50 9.47 11.01 11.01 9.98 9.76 16.22
93 | 99.99: 1081.34 16.90 16.90 16.90 16.90 16.90 0.00 15.95
94 | worst: 2162.69 499.71 434.18 540.67 573.44 352.26 29.51 31.34
95 | -------------------------------------------------------------------------------------------------------------------
96 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
97 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
98 | 50: 1.63 1.63 1.57 1.57 1.57 1.57 2.65 10.35
99 | 90: 1.82 1.76 1.76 1.76 1.70 1.70 2.45 10.60
100 | 99: 4.74 4.74 4.74 4.74 4.74 4.74 0.00 13.69
101 | 99.9: 13.06 12.03 12.03 12.54 12.54 12.54 2.76 16.92
102 | 99.99: 1032.19 17.92 20.99 17.92 17.92 17.92 10.26 16.32
103 | worst: 3997.70 966.66 770.05 540.67 638.98 352.26 53.76 32.41
104 | -------------------------------------------------------------------------------------------------------------------
105 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-200k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 31 to Thread[pathIn to stage2,5,main]
2 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[stage2 to stage3,5,main]
3 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage3 to pathOut,5,main]
4 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[main,5,main]
5 | Complete: 50000
6 | Warm up complete (50000 iterations took 1.182s)
7 | Pausing after warmup for 500ms
8 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
9 | Run time: 120.001s
10 | Correcting for co-ordinated:true
11 | Target throughput:200000/s = 1 message every 5us
12 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 8.4 14 / 28 1,610 / 4,330 4,590 / 4,850
13 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.0 5.0 / 14 1,150 / 2,560 2,560 / 3,470
14 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.9 6.0 / 14 319 / 1,340 1,930 / 2,160
15 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 5.5 / 15 803 / 1,410 1,800 / 2,560
16 | OS Jitter (394,764) 50/90 99/99.9 99.99 - worst was 12 / 14 18 / 72 401 - 1,280
17 | -------------------------------------------------------------------------------------------------------------------
18 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
19 | Run time: 120.0s
20 | Correcting for co-ordinated:true
21 | Target throughput:200000/s = 1 message every 5us
22 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 8.4 14 / 22 287 / 606 836 / 868
23 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.0 5.0 / 13 28 / 129 225 / 573
24 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 5.5 / 13 32 / 270 369 / 541
25 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.9 5.5 / 14 250 / 606 705 / 737
26 | OS Jitter (458,460) 50/90 99/99.9 99.99 - worst was 12 / 14 31 / 76 319 - 868
27 | -------------------------------------------------------------------------------------------------------------------
28 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
29 | Run time: 120.0s
30 | Correcting for co-ordinated:true
31 | Target throughput:200000/s = 1 message every 5us
32 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 8.4 14 / 23 184 / 483 737 / 803
33 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.0 5.2 / 14 96 / 217 303 / 672
34 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 6.0 / 14 38 / 193 270 / 639
35 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.8 5.5 / 14 72 / 483 737 / 803
36 | OS Jitter (526,705) 50/90 99/99.9 99.99 - worst was 12 / 14 32 / 76 160 - 836
37 | -------------------------------------------------------------------------------------------------------------------
38 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
39 | Run time: 120.0s
40 | Correcting for co-ordinated:true
41 | Target throughput:200000/s = 1 message every 5us
42 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.2 / 8.4 14 / 23 184 / 451 737 / 770
43 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.0 5.2 / 14 96 / 152 225 / 385
44 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 6.0 / 14 32 / 209 270 / 303
45 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 1.9 5.8 / 14 92 / 451 737 / 770
46 | OS Jitter (495,047) 50/90 99/99.9 99.99 - worst was 12 / 14 32 / 76 258 - 803
47 | -------------------------------------------------------------------------------------------------------------------
48 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
49 | Run time: 120.0s
50 | Correcting for co-ordinated:true
51 | Target throughput:200000/s = 1 message every 5us
52 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 8.4 14 / 25 209 / 573 705 / 737
53 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.1 5.2 / 14 109 / 201 303 / 705
54 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 5.5 / 13 32 / 168 233 / 287
55 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 5.8 / 14 143 / 573 705 / 737
56 | OS Jitter (473,964) 50/90 99/99.9 99.99 - worst was 12 / 14 32 / 76 160 - 770
57 | -------------------------------------------------------------------------------------------------------------------
58 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
59 | Run time: 120.0s
60 | Correcting for co-ordinated:true
61 | Target throughput:200000/s = 1 message every 5us
62 | End to End: (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 9.0 15 / 27 209 / 606 770 / 836
63 | Service 2 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.3 5.8 / 15 117 / 209 573 / 770
64 | Service 3 (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 6.0 / 14 34 / 184 242 / 287
65 | Service Out (24,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 2.0 6.5 / 15 109 / 573 737 / 803
66 | OS Jitter (448,374) 50/90 99/99.9 99.99 - worst was 12 / 15 32 / 76 168 - 737
67 | -------------------------------------------------------------------------------------------------------------------
68 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 28 from Thread[main,5,main]
69 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
70 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
71 | 50: 5.25 5.50 5.25 5.25 5.50 5.50 3.15 14.13
72 | 90: 8.45 8.45 8.45 8.45 8.45 8.96 3.88 15.67
73 | 99: 13.57 13.57 14.08 14.08 14.08 14.59 4.79 17.46
74 | 99.9: 28.16 22.02 23.04 23.04 25.09 27.14 13.42 19.33
75 | 99.99: 1605.63 286.72 184.32 184.32 208.90 208.90 27.03 27.17
76 | worst: 4849.66 868.35 802.82 770.05 737.28 835.58 10.60 33.74
77 | -------------------------------------------------------------------------------------------------------------------
78 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
79 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
80 | 50: 1.50 1.50 1.50 1.50 1.57 1.57 2.76 10.28
81 | 90: 3.01 3.01 3.01 3.01 3.14 3.26 5.37 12.35
82 | 99: 4.99 4.99 5.25 5.25 5.25 5.76 9.30 14.08
83 | 99.9: 14.08 12.54 13.57 13.57 14.08 14.59 9.82 17.30
84 | 99.99: 1146.88 28.16 96.26 96.26 108.54 116.74 67.71 22.60
85 | worst: 3473.41 573.44 671.74 385.02 704.51 770.05 40.00 32.37
86 | -------------------------------------------------------------------------------------------------------------------
87 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
88 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
89 | 50: 1.57 1.57 1.57 1.57 1.63 1.63 2.65 10.40
90 | 90: 1.89 1.95 1.95 1.95 1.95 2.02 2.14 11.01
91 | 99: 6.02 5.50 6.02 6.02 5.50 6.02 5.84 14.33
92 | 99.9: 14.08 13.06 13.57 13.57 13.06 14.08 4.97 17.24
93 | 99.99: 319.49 32.26 37.89 32.26 32.26 33.79 10.43 19.32
94 | worst: 2162.69 540.67 638.98 303.10 286.72 286.72 45.03 30.22
95 | -------------------------------------------------------------------------------------------------------------------
96 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
97 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
98 | 50: 1.57 1.57 1.57 1.57 1.57 1.63 2.65 10.37
99 | 90: 1.82 1.89 1.82 1.89 1.95 2.02 6.56 10.93
100 | 99: 5.50 5.50 5.50 5.76 5.76 6.53 11.03 14.38
101 | 99.9: 15.10 13.57 14.08 14.08 14.08 14.59 4.79 17.39
102 | 99.99: 802.82 249.86 71.68 92.16 143.36 108.54 62.37 24.80
103 | worst: 2555.90 737.28 802.82 770.05 737.28 802.82 5.59 34.03
104 | -------------------------------------------------------------------------------------------------------------------
105 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-300k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - No isolated CPUs found, so assuming CPUs 1 to 31 available.
2 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[pathIn to stage2,5,main]
3 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage3 to pathOut,5,main]
4 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[stage2 to stage3,5,main]
5 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 27 to Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 1.231s)
8 | Pausing after warmup for 500ms
9 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
10 | Run time: 119.988s
11 | Correcting for co-ordinated:true
12 | Target throughput:300000/s = 1 message every 3us
13 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.8 / 9.5 17 / 3,210 10,220 / 12,850 12,850 / 12,850
14 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.4 7.3 / 967 8,650 / 10,220 10,220 / 10,220
15 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.4 7.0 / 143 1,610 / 1,740 1,740 / 1,740
16 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.5 9.0 / 467 2,690 / 2,820 2,950 / 2,950
17 | OS Jitter (539,412) 50/90 99/99.9 99.99 - worst was 12 / 14 32 / 80 270 - 1,280
18 | -------------------------------------------------------------------------------------------------------------------
19 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
20 | Run time: 119.988s
21 | Correcting for co-ordinated:true
22 | Target throughput:300000/s = 1 message every 3us
23 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 9.5 16 / 26 336 / 1,150 1,210 / 1,210
24 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.4 6.8 / 15 129 / 258 303 / 541
25 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.4 6.5 / 15 129 / 541 967 / 1,030
26 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.5 7.8 / 16 168 / 967 1,030 / 1,080
27 | OS Jitter (719,432) 50/90 99/99.9 99.99 - worst was 2.4 / 14 20 / 76 160 - 901
28 | -------------------------------------------------------------------------------------------------------------------
29 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
30 | Run time: 119.988s
31 | Correcting for co-ordinated:true
32 | Target throughput:300000/s = 1 message every 3us
33 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 9.5 16 / 27 270 / 639 770 / 803
34 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.4 6.8 / 15 160 / 287 573 / 705
35 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.4 6.5 / 15 104 / 606 770 / 770
36 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.5 7.8 / 16 72 / 250 319 / 467
37 | OS Jitter (734,227) 50/90 99/99.9 99.99 - worst was 2.2 / 14 26 / 76 168 - 934
38 | -------------------------------------------------------------------------------------------------------------------
39 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
40 | Run time: 119.988s
41 | Correcting for co-ordinated:true
42 | Target throughput:300000/s = 1 message every 3us
43 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.5 / 9.5 17 / 30 270 / 737 901 / 934
44 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.5 7.3 / 15 168 / 258 287 / 803
45 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.5 6.8 / 16 143 / 737 868 / 934
46 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.5 8.4 / 17 76 / 250 287 / 516
47 | OS Jitter (739,294) 50/90 99/99.9 99.99 - worst was 2.5 / 14 18 / 76 303 - 967
48 | -------------------------------------------------------------------------------------------------------------------
49 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
50 | Run time: 119.988s
51 | Correcting for co-ordinated:true
52 | Target throughput:300000/s = 1 message every 3us
53 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 5.8 / 10.0 17 / 65 303 / 705 770 / 803
54 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.8 7.6 / 17 217 / 672 770 / 803
55 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.8 7.3 / 17 125 / 483 770 / 803
56 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.8 8.4 / 19 96 / 250 573 / 606
57 | OS Jitter (734,762) 50/90 99/99.9 99.99 - worst was 2.6 / 14 31 / 80 287 - 868
58 | -------------------------------------------------------------------------------------------------------------------
59 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
60 | Run time: 119.988s
61 | Correcting for co-ordinated:true
62 | Target throughput:300000/s = 1 message every 3us
63 | End to End: (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 6.5 / 11 20 / 287 999 / 1,740 1,870 / 1,870
64 | Service 2 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.5 / 3.8 7.8 / 58 606 / 967 1,030 / 1,080
65 | Service 3 (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 12 / 184 803 / 1,740 1,870 / 1,870
66 | Service Out (36,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 3.9 8.4 / 19 88 / 250 287 / 1,870
67 | OS Jitter (907,519) 50/90 99/99.9 99.99 - worst was 3.1 / 14 17 / 72 258 - 1,030
68 | -------------------------------------------------------------------------------------------------------------------
69 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 27 from Thread[main,5,main]
70 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
71 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
72 | 50: 5.76 5.50 5.50 5.50 5.76 6.53 11.03 14.32
73 | 90: 9.47 9.47 9.47 9.47 9.98 11.01 9.76 16.19
74 | 99: 16.90 16.13 16.13 16.90 16.90 19.97 13.70 18.17
75 | 99.9: 3211.26 26.11 27.14 30.21 64.51 286.72 86.93 20.26
76 | 99.99: 10223.62 335.87 270.34 270.34 303.10 999.42 64.26 29.00
77 | worst: 12845.06 1212.42 802.82 933.89 802.82 1867.78 46.93 34.66
78 | -------------------------------------------------------------------------------------------------------------------
79 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
80 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
81 | 50: 1.50 1.50 1.50 1.50 1.50 1.50 0.00 10.23
82 | 90: 3.39 3.39 3.39 3.52 3.78 3.78 7.02 12.81
83 | 99: 7.30 6.78 6.78 7.30 7.55 7.81 9.14 15.08
84 | 99.9: 966.66 14.59 14.59 15.10 16.90 58.37 66.67 16.69
85 | 99.99: 8650.75 129.02 159.74 167.94 217.09 606.21 71.15 26.22
86 | worst: 10223.62 540.67 704.51 802.82 802.82 1081.34 40.00 32.91
87 | -------------------------------------------------------------------------------------------------------------------
88 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
89 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
90 | 50: 1.57 1.57 1.57 1.57 1.57 1.63 2.65 10.37
91 | 90: 3.39 3.39 3.39 3.52 3.78 4.22 14.05 12.90
92 | 99: 7.04 6.53 6.53 6.78 7.30 11.52 33.77 15.28
93 | 99.9: 143.36 14.59 14.59 15.62 16.90 184.32 88.58 18.72
94 | 99.99: 1605.63 129.02 104.45 143.36 124.93 802.82 81.68 26.46
95 | worst: 1736.70 1032.19 770.05 933.89 802.82 1867.78 48.73 36.10
96 | -------------------------------------------------------------------------------------------------------------------
97 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
98 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
99 | 50: 1.63 1.57 1.57 1.57 1.57 1.63 2.65 10.35
100 | 90: 3.52 3.52 3.52 3.52 3.78 3.90 6.78 12.87
101 | 99: 8.96 7.81 7.81 8.45 8.45 8.45 5.18 15.46
102 | 99.9: 466.94 15.62 15.62 16.90 18.94 18.94 12.44 16.34
103 | 99.99: 2686.98 167.94 71.68 75.78 96.26 88.06 47.24 22.88
104 | worst: 2949.12 1081.34 466.94 516.10 606.21 1867.78 66.67 34.06
105 | -------------------------------------------------------------------------------------------------------------------
106 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-400k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - No isolated CPUs found, so assuming CPUs 1 to 31 available.
2 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[pathIn to stage2,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage2 to stage3,5,main]
4 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[stage3 to pathOut,5,main]
5 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 27 to Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 1.156s)
8 | Pausing after warmup for 500ms
9 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
10 | Run time: 120.0s
11 | Correcting for co-ordinated:true
12 | Target throughput:400000/s = 1 message every 2us
13 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.8 / 14 28 / 28,840 38,800 / 38,800 38,800 / 38,800
14 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 4.5 13 / 17,300 27,790 / 28,840 28,840 / 28,840
15 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.9 / 4.7 14 / 14,940 18,350 / 19,400 19,400 / 19,400
16 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.9 / 4.7 15 / 4,130 8,650 / 9,180 9,180 / 9,180
17 | OS Jitter (757,165) 50/90 99/99.9 99.99 - worst was 2.4 / 14 19 / 80 168 - 1,470
18 | -------------------------------------------------------------------------------------------------------------------
19 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
20 | Run time: 120.0s
21 | Correcting for co-ordinated:true
22 | Target throughput:400000/s = 1 message every 2us
23 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.3 / 12 22 / 23,590 36,700 / 38,800 38,800 / 38,800
24 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 11 / 19,400 34,600 / 34,600 34,600 / 34,600
25 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.7 / 4.0 9.5 / 1,080 2,160 / 2,290 2,290 / 2,290
26 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 10 / 2,420 4,850 / 5,110 5,110 / 5,110
27 | OS Jitter (913,833) 50/90 99/99.9 99.99 - worst was 2.0 / 14 18 / 72 160 - 1,210
28 | -------------------------------------------------------------------------------------------------------------------
29 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
30 | Run time: 120.0s
31 | Correcting for co-ordinated:true
32 | Target throughput:400000/s = 1 message every 2us
33 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.3 / 13 22 / 152 385 / 705 803 / 836
34 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.5 11 / 32 287 / 369 418 / 737
35 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.7 / 4.2 9.5 / 22 113 / 250 303 / 516
36 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.7 / 4.5 10 / 36 233 / 672 803 / 836
37 | OS Jitter (926,042) 50/90 99/99.9 99.99 - worst was 2.2 / 14 18 / 76 168 - 967
38 | -------------------------------------------------------------------------------------------------------------------
39 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
40 | Run time: 120.0s
41 | Correcting for co-ordinated:true
42 | Target throughput:400000/s = 1 message every 2us
43 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.8 / 14 24 / 319 2,690 / 3,870 4,000 / 4,000
44 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.0 12 / 152 672 / 1,670 1,740 / 1,800
45 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 4.7 10 / 46 803 / 1,150 1,150 / 1,150
46 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.0 12 / 92 1,210 / 1,740 1,800 / 1,800
47 | OS Jitter (924,863) 50/90 99/99.9 99.99 - worst was 2.2 / 15 18 / 80 193 - 1,280
48 | -------------------------------------------------------------------------------------------------------------------
49 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
50 | Run time: 120.0s
51 | Correcting for co-ordinated:true
52 | Target throughput:400000/s = 1 message every 2us
53 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.8 / 14 25 / 303 516 / 803 868 / 901
54 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.0 13 / 209 401 / 737 868 / 868
55 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 4.7 10 / 38 258 / 705 868 / 901
56 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.0 12 / 84 217 / 467 770 / 901
57 | OS Jitter (922,907) 50/90 99/99.9 99.99 - worst was 2.2 / 15 18 / 80 168 - 1,080
58 | -------------------------------------------------------------------------------------------------------------------
59 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
60 | Run time: 120.0s
61 | Correcting for co-ordinated:true
62 | Target throughput:400000/s = 1 message every 2us
63 | End to End: (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 7.8 / 14 26 / 451 1,930 / 2,950 3,080 / 3,080
64 | Service 2 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.2 14 / 303 967 / 1,740 1,870 / 1,870
65 | Service 3 (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 4.7 12 / 58 999 / 1,340 1,410 / 1,410
66 | Service Out (48,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.8 / 5.2 14 / 117 500 / 1,080 1,150 / 1,150
67 | OS Jitter (970,993) 50/90 99/99.9 99.99 - worst was 2.2 / 15 30 / 80 201 - 1,210
68 | -------------------------------------------------------------------------------------------------------------------
69 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 27 from Thread[main,5,main]
70 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
71 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
72 | 50: 7.81 7.30 7.30 7.81 7.81 7.81 4.47 15.24
73 | 90: 13.57 12.03 12.54 13.57 14.08 14.08 10.19 17.19
74 | 99: 28.16 22.02 22.02 24.06 25.09 26.11 11.03 19.29
75 | 99.9: 28835.84 23592.96 151.55 319.49 303.10 450.56 99.04 32.19
76 | 99.99: 38797.31 36700.16 385.02 2686.98 516.10 1933.31 98.43 38.27
77 | worst: 38797.31 38797.31 835.58 3997.70 901.12 3080.19 96.80 40.97
78 | -------------------------------------------------------------------------------------------------------------------
79 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
80 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
81 | 50: 1.82 1.63 1.63 1.76 1.76 1.82 7.27 10.58
82 | 90: 4.48 4.22 4.48 4.99 4.99 5.25 13.91 13.75
83 | 99: 13.06 11.01 11.01 12.03 12.54 13.57 13.42 16.80
84 | 99.9: 17301.50 19398.66 32.26 151.55 208.90 303.10 99.75 29.26
85 | 99.99: 27787.26 34603.01 286.72 671.74 401.41 966.66 98.76 35.37
86 | worst: 28835.84 34603.01 737.28 1802.24 868.35 1867.78 96.84 39.22
87 | -------------------------------------------------------------------------------------------------------------------
88 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
89 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
90 | 50: 1.89 1.70 1.70 1.76 1.76 1.76 2.45 10.59
91 | 90: 4.74 4.03 4.22 4.74 4.74 4.74 10.43 13.48
92 | 99: 13.57 9.47 9.47 10.50 10.50 11.52 12.60 16.13
93 | 99.9: 14942.21 1081.34 22.02 46.08 37.89 58.37 96.98 21.39
94 | 99.99: 18350.08 2162.69 112.64 802.82 258.05 999.42 92.39 30.84
95 | worst: 19398.66 2293.76 516.10 1146.88 901.12 1409.02 69.66 34.64
96 | -------------------------------------------------------------------------------------------------------------------
97 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
98 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
99 | 50: 1.89 1.63 1.70 1.76 1.82 1.82 7.27 10.61
100 | 90: 4.74 4.22 4.48 4.99 4.99 5.25 13.91 13.72
101 | 99: 14.59 10.50 10.50 12.03 12.03 13.57 16.33 16.62
102 | 99.9: 4128.77 2424.83 35.84 92.16 83.97 116.74 97.80 25.24
103 | 99.99: 8650.75 4849.66 233.47 1212.42 217.09 499.71 93.43 32.62
104 | worst: 9175.04 5111.81 835.58 1802.24 901.12 1146.88 77.33 37.12
105 | -------------------------------------------------------------------------------------------------------------------
106 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-450k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - No isolated CPUs found, so assuming CPUs 1 to 31 available.
2 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[stage3 to pathOut,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage2 to stage3,5,main]
4 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[pathIn to stage2,5,main]
5 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 27 to Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 2.713s)
8 | Pausing after warmup for 500ms
9 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
10 | Run time: 173.222s
11 | Correcting for co-ordinated:true
12 | Target throughput:450000/s = 1 message every 2us
13 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 39,728,450 / 50,465,870 52,613,350 / 52,613,350 52,613,350 / 52,613,350 52,613,350 / 52,613,350
14 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 39,728,450 / 50,465,870 52,613,350 / 52,613,350 52,613,350 / 52,613,350 52,613,350 / 52,613,350
15 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 5.8 15 / 2,690 61,870 / 69,210 69,210 / 77,590
16 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.0 16 / 639 2,820 / 18,350 23,590 / 94,370
17 | OS Jitter (2,826,692) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.0 15 / 72 934 / 59,770 - 163,580
18 | -------------------------------------------------------------------------------------------------------------------
19 | [GC (Allocation Failure) 12582912K->2520K(14686208K), 0.1147547 secs]
20 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
21 | Run time: 154.9s
22 | Correcting for co-ordinated:true
23 | Target throughput:450000/s = 1 message every 2us
24 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 16,911,430 / 29,527,900 32,749,130 / 35,433,480 35,433,480 / 35,433,480 35,433,480 / 35,433,480
25 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 16,911,430 / 29,527,900 32,749,130 / 35,433,480 35,433,480 / 35,433,480 35,433,480 / 35,433,480
26 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 4.5 15 / 672 73,400 / 85,980 90,180 / 123,730
27 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 20 / 5,900 51,380 / 59,770 61,870 / 123,730
28 | OS Jitter (2,789,001) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.5 15 / 76 2,000 / 5,110 - 123,730
29 | -------------------------------------------------------------------------------------------------------------------
30 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
31 | Run time: 159.865s
32 | Correcting for co-ordinated:true
33 | Target throughput:450000/s = 1 message every 2us
34 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 19,864,220 / 35,433,480 39,728,450 / 39,728,450 39,728,450 / 39,728,450 39,728,450 / 39,728,450
35 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 19,864,220 / 35,433,480 39,728,450 / 39,728,450 39,728,450 / 39,728,450 39,728,450 / 39,728,450
36 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 4.5 9.0 / 36 467 / 868 934 / 8,260
37 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.0 8.4 / 287 6,420 / 7,470 7,730 / 8,260
38 | OS Jitter (3,003,910) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.5 15 / 68 868 / 967 - 34,600
39 | -------------------------------------------------------------------------------------------------------------------
40 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
41 | Run time: 162.324s
42 | Correcting for co-ordinated:true
43 | Target throughput:450000/s = 1 message every 2us
44 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 37,580,960 41,875,930 / 41,875,930 41,875,930 / 41,875,930 41,875,930 / 41,875,930
45 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 37,580,960 41,875,930 / 41,875,930 41,875,930 / 41,875,930 41,875,930 / 41,875,930
46 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 4.7 9.5 / 19 573 / 901 967 / 8,260
47 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 8.4 / 21 705 / 1,410 1,540 / 8,260
48 | OS Jitter (3,162,184) 50/90 99/99.9 99.99/99.999 - worst was 3.3 / 6.0 16 / 68 868 / 1,030 - 13,370
49 | -------------------------------------------------------------------------------------------------------------------
50 | [GC (Allocation Failure) 12585432K->1680K(14686208K), 0.0086838 secs]
51 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
52 | Run time: 164.752s
53 | Correcting for co-ordinated:true
54 | Target throughput:450000/s = 1 message every 2us
55 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 25,232,930 / 41,875,930 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
56 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 25,232,930 / 41,875,930 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
57 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 4.7 10 / 1,030 146,800 / 163,580 163,580 / 171,970
58 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.5 11 / 2,820 63,960 / 69,210 69,210 / 73,400
59 | OS Jitter (3,247,153) 50/90 99/99.9 99.99/99.999 - worst was 3.3 / 6.0 16 / 76 2,000 / 2,950 - 34,600
60 | -------------------------------------------------------------------------------------------------------------------
61 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
62 | Run time: 161.616s
63 | Correcting for co-ordinated:true
64 | Target throughput:450000/s = 1 message every 2us
65 | End to End: (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 37,580,960 41,875,930 / 41,875,930 41,875,930 / 41,875,930 41,875,930 / 41,875,930
66 | Service 2 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 37,580,960 41,875,930 / 41,875,930 41,875,930 / 41,875,930 41,875,930 / 41,875,930
67 | Service 3 (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 4.7 9.5 / 18 418 / 901 967 / 3,340
68 | Service Out (54,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.2 8.4 / 22 1,670 / 2,290 2,420 / 2,420
69 | OS Jitter (3,255,189) 50/90 99/99.9 99.99/99.999 - worst was 3.3 / 6.0 15 / 72 836 / 999 - 6,950
70 | -------------------------------------------------------------------------------------------------------------------
71 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 27 from Thread[main,5,main]
72 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
73 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
74 | 50: 39728447.49 16911433.73 19864223.74 22011707.39 25232932.86 22011707.39 24.70 106.92
75 | 90: 50465865.73 29527900.16 35433480.19 37580963.84 41875931.14 37580963.84 21.80 112.38
76 | 99: 52613349.38 32749125.63 39728447.49 41875931.14 44023414.78 41875931.14 18.67 113.37
77 | 99.9: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
78 | 99.99: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
79 | worst: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
80 | -------------------------------------------------------------------------------------------------------------------
81 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
82 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
83 | 50: 39728447.49 16911433.73 19864223.74 22011707.39 25232932.86 22011707.39 24.70 106.92
84 | 90: 50465865.73 29527900.16 35433480.19 37580963.84 41875931.14 37580963.84 21.80 112.38
85 | 99: 52613349.38 32749125.63 39728447.49 41875931.14 44023414.78 41875931.14 18.67 113.37
86 | 99.9: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
87 | 99.99: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
88 | worst: 52613349.38 35433480.19 39728447.49 41875931.14 44023414.78 41875931.14 13.91 113.54
89 | -------------------------------------------------------------------------------------------------------------------
90 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
91 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
92 | 50: 1.95 1.95 2.02 2.02 2.02 2.02 2.14 11.06
93 | 90: 5.76 4.48 4.48 4.74 4.74 4.74 3.67 13.49
94 | 99: 14.59 14.59 8.96 9.47 10.50 9.47 29.53 16.15
95 | 99.9: 2686.98 671.74 35.84 18.94 1032.19 17.92 97.42 23.55
96 | 99.99: 61865.98 73400.32 466.94 573.44 146800.64 417.79 99.57 43.08
97 | worst: 77594.62 123731.97 8257.54 8257.54 171966.46 3342.34 97.11 53.59
98 | -------------------------------------------------------------------------------------------------------------------
99 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
100 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
101 | 50: 1.57 1.57 1.57 1.57 1.57 1.57 0.00 10.34
102 | 90: 4.03 4.22 4.03 4.22 4.48 4.22 6.90 13.35
103 | 99: 16.13 19.97 8.45 8.45 11.01 8.45 47.62 16.16
104 | 99.9: 638.98 5898.24 286.72 20.99 2818.05 22.02 99.47 30.69
105 | 99.99: 2818.05 51380.22 6422.53 704.51 63963.14 1671.17 98.36 49.67
106 | worst: 94371.84 123731.97 8257.54 8257.54 73400.32 2424.83 97.09 51.59
107 | -------------------------------------------------------------------------------------------------------------------
108 |
109 | Process finished with exit code 0
110 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-500k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - No isolated CPUs found, so assuming CPUs 1 to 31 available.
2 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[stage2 to stage3,5,main]
3 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage3 to pathOut,5,main]
4 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[pathIn to stage2,5,main]
5 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 27 to Thread[main,5,main]
6 | Complete: 50000
7 | Warm up complete (50000 iterations took 3.108s)
8 | Pausing after warmup for 500ms
9 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
10 | Run time: 169.47s
11 | Correcting for co-ordinated:true
12 | Target throughput:500000/s = 1 message every 2us
13 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 26,306,670 / 46,170,900 48,318,380 / 50,465,870 50,465,870 / 50,465,870 50,465,870 / 50,465,870
14 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 26,306,670 / 46,170,900 48,318,380 / 50,465,870 50,465,870 / 50,465,870 50,465,870 / 50,465,870
15 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.9 / 4.5 17 / 7,210 42,990 / 49,280 51,380 / 119,540
16 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 4.0 18 / 934 28,840 / 55,570 59,770 / 59,770
17 | OS Jitter (3,042,210) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.0 13 / 19 4,590 / 49,280 - 188,740
18 | -------------------------------------------------------------------------------------------------------------------
19 | [GC (Allocation Failure) 12582912K->2520K(14686208K), 0.0110813 secs]
20 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
21 | Run time: 174.465s
22 | Correcting for co-ordinated:true
23 | Target throughput:500000/s = 1 message every 2us
24 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 25,232,930 / 48,318,380 54,760,830 / 54,760,830 54,760,830 / 54,760,830 54,760,830 / 54,760,830
25 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 25,232,930 / 48,318,380 54,760,830 / 54,760,830 54,760,830 / 54,760,830 54,760,830 / 54,760,830
26 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 8,000 494,930 / 587,200 620,760 / 620,760 620,760 / 620,760
27 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.6 / 6.8 3,210 / 18,350 53,480 / 73,400 77,590 / 77,590
28 | OS Jitter (2,706,718) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.8 14 / 516 23,590 / 55,570 - 205,520
29 | -------------------------------------------------------------------------------------------------------------------
30 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
31 | Run time: 177.265s
32 | Correcting for co-ordinated:true
33 | Target throughput:500000/s = 1 message every 2us
34 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 30,601,640 / 52,613,350 56,908,320 / 56,908,320 56,908,320 / 56,908,320 56,908,320 / 56,908,320
35 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 30,601,640 / 52,613,350 56,908,320 / 56,908,320 56,908,320 / 56,908,320 56,908,320 / 56,908,320
36 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 155,190 / 1,644,170 2,348,810 / 2,483,030 2,483,030 / 2,483,030 2,483,030 / 2,483,030
37 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.0 / 129 15,470 / 21,500 25,690 / 26,740 26,740 / 26,740
38 | OS Jitter (2,056,588) 50/90 99/99.9 99.99/99.999 - worst was 3.1 / 5.5 23 / 14,940 36,700 / 73,400 - 276,820
39 | -------------------------------------------------------------------------------------------------------------------
40 | [GC (Allocation Failure) 12585432K->1664K(14686208K), 0.0100359 secs]
41 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
42 | Run time: 163.967s
43 | Correcting for co-ordinated:true
44 | Target throughput:500000/s = 1 message every 2us
45 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 31,675,380 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
46 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 29,527,900 / 41,875,930 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
47 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 511,710 / 2,617,250 2,885,680 / 2,885,680 2,885,680 / 2,885,680 2,885,680 / 2,885,680
48 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 2.1 / 247,460 511,710 / 620,760 1,442,840 / 1,509,950 1,577,060 / 1,577,060
49 | OS Jitter (1,846,769) 50/90 99/99.9 99.99/99.999 - worst was 3.1 / 6.8 23 / 10,220 36,700 / 81,790 - 276,820
50 | -------------------------------------------------------------------------------------------------------------------
51 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
52 | Run time: 120.0s
53 | Correcting for co-ordinated:true
54 | Target throughput:500000/s = 1 message every 2us
55 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 17 / 58 10,220 / 34,600 38,800 / 40,890 40,890 / 40,890
56 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 3.8 / 13 705 / 8,000 12,850 / 13,890 13,890 / 13,890
57 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 4.2 / 14 1,740 / 27,790 38,800 / 40,890 40,890 / 40,890
58 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 6.0 / 31 4,130 / 17,300 20,450 / 20,450 20,450 / 20,450
59 | OS Jitter (922,773) 50/90 99/99.9 99.99 - worst was 2.2 / 14 18 / 72 135 - 1,210
60 | -------------------------------------------------------------------------------------------------------------------
61 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
62 | Run time: 164.514s
63 | Correcting for co-ordinated:true
64 | Target throughput:500000/s = 1 message every 2us
65 | End to End: (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 39,728,450 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
66 | Service 2 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 3.4 / 13 4,590 / 119,540 132,120 / 132,120 138,410 / 138,410
67 | Service 3 (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 22,011,710 / 39,728,450 44,023,410 / 44,023,410 44,023,410 / 44,023,410 44,023,410 / 44,023,410
68 | Service Out (60,000,000) 50/90 99/99.9 99.99/99.999 99.9999/worst was 1.9 / 5.2 19 / 868 3,210 / 4,850 5,640 / 77,590
69 | OS Jitter (3,004,362) 50/90 99/99.9 99.99/99.999 - worst was 2.9 / 5.8 14 / 23 129 / 7,730 - 25,690
70 | -------------------------------------------------------------------------------------------------------------------
71 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 27 from Thread[main,5,main]
72 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
73 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
74 | 50: 26306674.69 25232932.86 30601641.98 31675383.81 16.90 22011707.39 100.00 87.91
75 | 90: 46170898.43 48318382.08 52613349.38 44023414.78 58.37 39728447.49 100.00 92.82
76 | 99: 48318382.08 54760833.02 56908316.67 44023414.78 10223.62 44023414.78 99.97 100.09
77 | 99.9: 50465865.73 54760833.02 56908316.67 44023414.78 34603.01 44023414.78 99.91 101.92
78 | 99.99: 50465865.73 54760833.02 56908316.67 44023414.78 38797.31 44023414.78 99.90 102.11
79 | worst: 50465865.73 54760833.02 56908316.67 44023414.78 40894.46 44023414.78 99.89 102.19
80 | -------------------------------------------------------------------------------------------------------------------
81 | [GC (Allocation Failure) 12584576K->1752K(14686208K), 0.1296658 secs]
82 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
83 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
84 | 50: 26306674.69 25232932.86 30601641.98 29527900.16 3.78 3.39 100.00 65.16
85 | 90: 46170898.43 48318382.08 52613349.38 41875931.14 13.06 13.06 100.00 69.64
86 | 99: 48318382.08 54760833.02 56908316.67 44023414.78 704.51 4587.52 100.00 80.47
87 | 99.9: 50465865.73 54760833.02 56908316.67 44023414.78 7995.39 119537.66 99.98 88.49
88 | 99.99: 50465865.73 54760833.02 56908316.67 44023414.78 12845.06 132120.58 99.97 89.35
89 | worst: 50465865.73 54760833.02 56908316.67 44023414.78 13893.63 138412.03 99.96 89.54
90 | -------------------------------------------------------------------------------------------------------------------
91 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
92 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
93 | 50: 1.89 1.95 155189.25 511705.09 4.22 22011707.39 100.00 66.84
94 | 90: 4.48 7995.39 1644167.17 2617245.70 13.57 39728447.49 100.00 87.89
95 | 99: 16.90 494927.87 2348810.24 2885681.15 1736.70 44023414.78 99.99 101.58
96 | 99.9: 7208.96 587202.56 2483027.97 2885681.15 27787.26 44023414.78 99.91 94.48
97 | 99.99: 42991.62 620756.99 2483027.97 2885681.15 38797.31 44023414.78 99.87 91.97
98 | worst: 119537.66 620756.99 2483027.97 2885681.15 40894.46 44023414.78 99.86 90.33
99 | -------------------------------------------------------------------------------------------------------------------
100 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
101 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
102 | 50: 1.57 1.57 1.95 2.11 6.02 1.89 65.41 11.80
103 | 90: 4.03 6.78 129.02 247463.94 31.23 5.25 100.00 32.68
104 | 99: 17.92 3211.26 15466.50 511705.09 4128.77 18.94 99.99 54.02
105 | 99.9: 933.89 18350.08 21495.81 620756.99 17301.50 868.35 99.79 58.97
106 | 99.99: 28835.84 53477.38 25690.11 1442840.58 20447.23 3211.26 99.67 60.08
107 | worst: 59768.83 77594.62 26738.69 1577058.30 20447.23 77594.62 98.07 64.86
108 | -------------------------------------------------------------------------------------------------------------------
109 |
--------------------------------------------------------------------------------
/src/test/results/E5-2650v2/mtm-50k.txt:
--------------------------------------------------------------------------------
1 | [pathIn to stage2] INFO net.openhft.affinity.AffinityLock - Assigning cpu 31 to Thread[pathIn to stage2,5,main]
2 | [stage3 to pathOut] INFO net.openhft.affinity.AffinityLock - Assigning cpu 30 to Thread[stage3 to pathOut,5,main]
3 | [stage2 to stage3] INFO net.openhft.affinity.AffinityLock - Assigning cpu 29 to Thread[stage2 to stage3,5,main]
4 | [main] INFO net.openhft.affinity.AffinityLock - Assigning cpu 28 to Thread[main,5,main]
5 | Complete: 50000
6 | Warm up complete (50000 iterations took 1.198s)
7 | Pausing after warmup for 500ms
8 | -------------------------------- BENCHMARK RESULTS (RUN 1) --------------------------------------------------------
9 | Run time: 120.0s
10 | Correcting for co-ordinated:true
11 | Target throughput:50000/s = 1 message every 20us
12 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 7.8 12 / 21 10,750 / 19,400 - 20,450
13 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.7 4.5 / 13 672 / 9,180 - 10,220
14 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 5.0 / 14 8,650 / 9,180 - 9,180
15 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.7 / 14 1,340 / 1,740 - 2,290
16 | OS Jitter (395,159) 50/90 99/99.9 99.99 - worst was 12 / 14 31 / 72 143 - 1,340
17 | -------------------------------------------------------------------------------------------------------------------
18 | -------------------------------- BENCHMARK RESULTS (RUN 2) --------------------------------------------------------
19 | Run time: 120.0s
20 | Correcting for co-ordinated:true
21 | Target throughput:50000/s = 1 message every 20us
22 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.5 / 7.8 11 / 19 50 / 467 - 737
23 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.7 4.2 / 7.6 17 / 451 - 705
24 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.7 / 10 15 / 88 - 303
25 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.7 / 12 16 / 225 - 483
26 | OS Jitter (408,038) 50/90 99/99.9 99.99 - worst was 12 / 13 31 / 76 135 - 803
27 | -------------------------------------------------------------------------------------------------------------------
28 | -------------------------------- BENCHMARK RESULTS (RUN 3) --------------------------------------------------------
29 | Run time: 120.0s
30 | Correcting for co-ordinated:true
31 | Target throughput:50000/s = 1 message every 20us
32 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 8.1 12 / 19 88 / 573 - 868
33 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.5 / 8.4 17 / 500 - 705
34 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 5.0 / 10.0 15 / 201 - 573
35 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 5.0 / 12 16 / 270 - 836
36 | OS Jitter (327,780) 50/90 99/99.9 99.99 - worst was 12 / 13 31 / 76 143 - 803
37 | -------------------------------------------------------------------------------------------------------------------
38 | -------------------------------- BENCHMARK RESULTS (RUN 4) --------------------------------------------------------
39 | Run time: 120.0s
40 | Correcting for co-ordinated:true
41 | Target throughput:50000/s = 1 message every 20us
42 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 8.1 11 / 19 27 / 451 - 737
43 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.5 / 7.8 15 / 352 - 672
44 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 5.0 / 10.0 15 / 92 - 401
45 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 5.0 / 12 15 / 217 - 737
46 | OS Jitter (333,813) 50/90 99/99.9 99.99 - worst was 12 / 13 31 / 76 152 - 1,030
47 | -------------------------------------------------------------------------------------------------------------------
48 | -------------------------------- BENCHMARK RESULTS (RUN 5) --------------------------------------------------------
49 | Run time: 120.0s
50 | Correcting for co-ordinated:true
51 | Target throughput:50000/s = 1 message every 20us
52 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 8.1 11 / 19 109 / 516 - 672
53 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.5 / 7.8 20 / 516 - 672
54 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 5.0 / 9.5 15 / 121 - 483
55 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.8 5.0 / 12 16 / 233 - 451
56 | OS Jitter (342,357) 50/90 99/99.9 99.99 - worst was 12 / 13 31 / 76 434 - 803
57 | -------------------------------------------------------------------------------------------------------------------
58 | -------------------------------- BENCHMARK RESULTS (RUN 6) --------------------------------------------------------
59 | Run time: 120.0s
60 | Correcting for co-ordinated:true
61 | Target throughput:50000/s = 1 message every 20us
62 | End to End: (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 5.8 / 8.1 11 / 19 104 / 541 - 737
63 | Service 2 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 4.5 / 7.0 17 / 483 - 705
64 | Service 3 (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.7 / 1.9 5.0 / 9.5 16 / 250 - 573
65 | Service Out (6,000,000) 50/90 99/99.9 99.99/99.999 - worst was 1.6 / 1.8 5.0 / 12 17 / 270 - 737
66 | OS Jitter (387,691) 50/90 99/99.9 99.99 - worst was 12 / 13 31 / 76 152 - 737
67 | -------------------------------------------------------------------------------------------------------------------
68 | [main] INFO net.openhft.affinity.LockInventory - Releasing cpu 28 from Thread[main,5,main]
69 | -------------------------------- SUMMARY (end to end)------------------------------------------------------------
70 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
71 | 50: 5.50 5.50 5.76 5.76 5.76 5.76 3.01 14.32
72 | 90: 7.81 7.81 8.06 8.06 8.06 8.06 2.14 15.45
73 | 99: 11.52 11.01 11.52 11.01 11.01 11.01 3.01 16.56
74 | 99.9: 20.99 18.94 18.94 18.94 18.94 18.94 0.00 18.47
75 | 99.99: 10747.90 50.18 88.06 27.14 108.54 104.45 66.67 20.72
76 | worst: 20447.23 737.28 868.35 737.28 671.74 737.28 16.33 32.26
77 | -------------------------------------------------------------------------------------------------------------------
78 | -------------------------------- SUMMARY (Service 2)------------------------------------------------------------
79 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
80 | 50: 1.57 1.57 1.63 1.63 1.63 1.57 2.65 10.42
81 | 90: 1.70 1.70 1.76 1.76 1.76 1.76 2.45 10.67
82 | 99: 4.48 4.22 4.48 4.48 4.48 4.48 3.88 13.46
83 | 99.9: 12.54 7.55 8.45 7.81 7.81 7.04 11.76 15.02
84 | 99.99: 671.74 16.90 16.90 15.10 19.97 16.90 17.67 16.18
85 | worst: 10223.62 704.51 704.51 671.74 671.74 704.51 3.15 32.31
86 | -------------------------------------------------------------------------------------------------------------------
87 | -------------------------------- SUMMARY (Service 3)------------------------------------------------------------
88 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
89 | 50: 1.63 1.57 1.70 1.70 1.70 1.70 5.16 10.53
90 | 90: 1.82 1.82 1.89 1.89 1.89 1.89 2.29 10.87
91 | 99: 4.99 4.74 4.99 4.99 4.99 4.99 3.48 13.82
92 | 99.9: 13.57 10.50 9.98 9.98 9.47 9.47 6.72 15.97
93 | 99.99: 8650.75 15.10 15.10 15.10 15.10 15.62 2.21 15.00
94 | worst: 9175.04 303.10 573.44 401.41 483.33 573.44 37.29 30.06
95 | -------------------------------------------------------------------------------------------------------------------
96 | -------------------------------- SUMMARY (Service Out)------------------------------------------------------------
97 | Percentile run1 run2 run3 run4 run5 run6 % Variation var(log)
98 | 50: 1.57 1.57 1.70 1.70 1.70 1.63 5.16 10.53
99 | 90: 1.76 1.76 1.82 1.82 1.82 1.82 2.37 10.77
100 | 99: 4.74 4.74 4.99 4.99 4.99 4.99 3.48 13.85
101 | 99.9: 13.57 11.52 11.52 11.52 11.52 11.52 0.00 16.61
102 | 99.99: 1343.49 16.13 15.62 15.10 16.13 16.90 7.33 15.66
103 | worst: 2293.76 483.33 835.58 737.28 450.56 737.28 36.29 32.95
104 | -------------------------------------------------------------------------------------------------------------------
105 |
--------------------------------------------------------------------------------