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
package com.test; | |
import net.openhft.chronicle.map.ChronicleMapBuilder; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.concurrent.ConcurrentMap; | |
public class ChMapDemo { | |
public void demoChMapSimple() throws IOException { |
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.io.IOException; | |
import java.util.Optional; | |
/** | |
* Created by daniel on 17/12/2015. | |
*/ | |
public class Test { | |
private static String NAME; | |
public static void main(String[] args)throws IOException { |
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
package nanotime; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by daniel on 28/10/2015. | |
*/ | |
public class NanoTimer { | |
public static void main(String[] args) throws InterruptedException { |
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
package nanotime; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by daniel on 28/10/2015. | |
*/ | |
public class NanoTimer { | |
public static void main(String[] args) throws InterruptedException { |
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
package nanotime; | |
import java.util.Arrays; | |
/** | |
* Created by daniel on 28/10/2015. | |
*/ | |
public class NanoTimer { | |
public static void main(String[] args) throws InterruptedException { | |
long[] samples = new long[100_000]; | |
int pauseInMicros = 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
package nanotime; | |
public class NanoTimer { | |
public static void main(String[] args) throws InterruptedException { | |
long[] samples = new long[1_000_000]; | |
for (int i = 0; i < samples.length; i++) { | |
long firstTime = System.nanoTime(); | |
long timeForNano = System.nanoTime() - firstTime; | |
samples[i] = timeForNano; |
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
package test; | |
import net.openhft.compiler.CachedCompiler; | |
/** | |
* Loads the addingStrategy and then after 3s replaces it with the | |
* subtractingStrategy. | |
*/ | |
public class DynamicJavaClassLoading { |
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
package net.openhft.engine.chronicle.demo; | |
import net.openhft.chronicle.bytes.Bytes; | |
import net.openhft.chronicle.core.pool.ClassAliasPool; | |
import net.openhft.chronicle.core.util.SerializableFunction; | |
import net.openhft.chronicle.wire.BinaryWire; | |
import net.openhft.chronicle.wire.TextWire; | |
import java.util.function.Function; |
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
package chronicle.demo; | |
import net.openhft.chronicle.bytes.Bytes; | |
import net.openhft.chronicle.core.util.SerializableFunction; | |
import net.openhft.chronicle.wire.BinaryWire; | |
import net.openhft.chronicle.wire.TextWire; | |
import java.util.function.Function; | |
/** |
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
package chronicle.demo; | |
import net.openhft.chronicle.bytes.Bytes; | |
import net.openhft.chronicle.wire.TextWire; | |
import org.junit.Assert; | |
import static org.junit.Assert.assertEquals; | |
/** | |
* Created by daniel on 09/10/2015. |