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 testing; | |
import com.hazelcast.jet.Jet; | |
import com.hazelcast.jet.JetInstance; | |
import com.hazelcast.jet.accumulator.LongLongAccumulator; | |
import com.hazelcast.jet.aggregate.AggregateOperation; | |
import com.hazelcast.jet.datamodel.KeyedWindowResult; | |
import com.hazelcast.jet.pipeline.Pipeline; | |
import com.hazelcast.jet.pipeline.Sinks; | |
import com.hazelcast.jet.pipeline.SourceBuilder; |
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 net.jpountz.lz4.LZ4Factory; | |
import net.jpountz.lz4.LZ4Exception; | |
import net.jpountz.lz4.LZ4FastDecompressor; | |
import net.jpountz.xxhash.XXHash32; | |
import net.jpountz.xxhash.XXHashFactory; | |
import java.io.EOFException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.ByteBuffer; |
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
private static final CpuConsumer cpuConsumer = new CpuConsumer(); | |
@BeforeClass | |
public static void prepareCpuConsumer() { | |
cpuConsumer.getReady(); | |
} | |
private static class CpuConsumer { | |
final int taskCount = 2 * Runtime.getRuntime().availableProcessors(); | |
volatile CountDownLatch workerLatch = new CountDownLatch(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 org.sample; | |
import static java.util.concurrent.TimeUnit.MILLISECONDS; | |
import java.util.Random; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.Fork; |
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 org.sample; | |
import static java.util.Arrays.setAll; | |
import static java.util.concurrent.TimeUnit.MILLISECONDS; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.Fork; |
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
(ns aleph.test.websocket | |
(:use | |
[clojure.test] | |
[lamina core connections] | |
[aleph.http] | |
[aleph.test.utils])) | |
(defmacro with-server [server & body] | |
`(let [kill-fn# ~server] | |
(try |