This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instrument | |
seqId: long | |
12401 | |
orderEventIdCounter | |
[...................................................................] | |
12403 | |
marketEventIdCounter | |
[..........................] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.annotation.JsonAutoDetect; | |
import com.fasterxml.jackson.annotation.JsonInclude; | |
import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
import com.fasterxml.jackson.annotation.PropertyAccessor; | |
import com.fasterxml.jackson.databind.DeserializationFeature; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping; | |
import com.fasterxml.jackson.databind.SerializationFeature; | |
import io.scalecube.cluster.Cluster; | |
import io.scalecube.cluster.ClusterConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I 2019-08-06T19:28:56,970 i.s.a.ClusteredServiceImpl recordingLog: [Entry{recordingId=0, leadershipTermId=0, termBaseLogPosition=0, logPosition=448, timestamp=1565102557183, serviceId=-1, type=0, entryIndex=0} | |
Entry{recordingId=0, leadershipTermId=1, termBaseLogPosition=448, logPosition=1600, timestamp=1565102578214, serviceId=-1, type=0, entryIndex=1} | |
Entry{recordingId=0, leadershipTermId=2, termBaseLogPosition=1600, logPosition=3200, timestamp=1565102626451, serviceId=-1, type=0, entryIndex=2} | |
Entry{recordingId=0, leadershipTermId=3, termBaseLogPosition=3200, logPosition=5504, timestamp=1565102701930, serviceId=-1, type=0, entryIndex=3} | |
Entry{recordingId=0, leadershipTermId=4, termBaseLogPosition=5504, logPosition=6400, timestamp=1565102813736, serviceId=-1, type=0, entryIndex=4} | |
Entry{recordingId=0, leadershipTermId=5, termBaseLogPosition=6400, logPosition=6976, timestamp=1565102860107, serviceId=-1, type=0, entryIndex=5} | |
Entry{recordingId=0, leadershipTermId=6, termBaseLogPosition=6976, logPosition=14784, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I 2019-08-06T19:11:09,803 i.s.a.ClusteredServiceImpl recordingLog: RecordingLog{entries=[Entry{recordingId=0, leadershipTermId=0, termBaseLogPosition=0, logPosition=448, timestamp=1565102557183, serviceId=-1, type=0, entryIndex=0}, Entry{recordingId=0, leadershipTermId=1, termBaseLogPosition=448, logPosition=1600, timestamp=1565102578214, serviceId=-1, type=0, entryIndex=1}, Entry{recordingId=0, leadershipTermId=2, termBaseLogPosition=1600, logPosition=3200, timestamp=1565102626451, serviceId=-1, type=0, entryIndex=2}, Entry{recordingId=0, leadershipTermId=3, termBaseLogPosition=3200, logPosition=5504, timestamp=1565102701930, serviceId=-1, type=0, entryIndex=3}, Entry{recordingId=0, leadershipTermId=4, termBaseLogPosition=5504, logPosition=6400, timestamp=1565102813736, serviceId=-1, type=0, entryIndex=4}, Entry{recordingId=0, leadershipTermId=5, termBaseLogPosition=6400, logPosition=6976, timestamp=1565102860107, serviceId=-1, type=0, entryIndex=5}, Entry{recordingId=0, leadershipTermId=6, termBaseLogPositi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Configurations { | |
int FRAGMENT_COUNT_LIMIT = Integer.getInteger("reactor.aeron.sample.frameCountLimit", 10); | |
int MESSAGE_LENGTH = Integer.getInteger("reactor.aeron.sample.messageLength", 32); | |
int WARMUP_NUMBER_OF_ITERATIONS = Integer.getInteger("reactor.aeron.sample.warmup.iterations", 5); | |
long WARMUP_NUMBER_OF_MESSAGES = Long.getLong("reactor.aeron.sample.warmup.messages", 10_000); | |
long NUMBER_OF_MESSAGES = Long.getLong("reactor.aeron.sample.messages", 100_000_000); | |
boolean EXCLUSIVE_PUBLICATIONS = | |
Boolean.getBoolean("reactor.aeron.sample.exclusive.publications"); | |
boolean EMBEDDED_MEDIA_DRIVER = Boolean.getBoolean("reactor.aeron.sample.embeddedMediaDriver"); | |
boolean INFO_FLAG = Boolean.getBoolean("reactor.aeron.sample.info"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MediaDriver THREADING_MODE: SHARED | |
Publishing Ping at aeron:udp?endpoint=localhost:13000|session-id=1001|reliable=true on stream Id -889323520 | |
Subscribing Pong at aeron:udp?control=localhost:13001|control-mode=dynamic|session-id=2147482646|reliable=true on stream Id -889323520 | |
Message length of 16 bytes | |
Using exclusive publications true | |
Using poling idle strategy class org.agrona.concurrent.YieldingIdleStrategy(yielding) | |
Request 128 | |
Waiting for new image from Pong... | |
Available image: channel=aeron:udp?control=localhost:13001|control-mode=dynamic|session-id=2147482646|reliable=true streamId=-889323520 session=2147482646 | |
Warming up... 5 iterations of 10000 messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======== 1 x 1280 ======== | |
-Dreactor.aeron.sample.messageLength=1280 \ | |
-Dreactor.aeron.sample.request=1 \ | |
#[Mean = 11.288, StdDeviation = 9.590] | |
#[Max = 2764.799, Total count = 87511] | |
#[Buckets = 24, SubBuckets = 2048] | |
======== 64 x 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1522370413043 | 0 pool-1-thread-1 | |
1522370413043 | 1 pool-1-thread-1 | |
1522370413043 | 2 pool-1-thread-1 | |
1522370413043 | 3 pool-1-thread-1 | |
1522370413043 | 4 pool-1-thread-1 | |
1522370413044 | 5 pool-1-thread-1 | |
1522370413044 | 6 pool-1-thread-1 | |
1522370413044 | 7 pool-1-thread-1 | |
1522370413044 | 8 pool-1-thread-1 | |
1522370413044 | 9 pool-1-thread-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.stream.IntStream; | |
public class SortedIteratorTest { | |
@Test | |
public void test1() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
public class SortedIterator<E extends Comparable<E>> implements Iterator<E> { | |
private final List<Iterator<E>> iterators; | |
private final PriorityQueue<Item<E>> queue = new PriorityQueue<>(); |