|
@@ -2,7 +2,7 @@ package com.hexagonkt
|
|
|
|
|
|
import com.hexagonkt.async.Benchmark
|
|
import com.hexagonkt.async.Benchmark
|
|
import com.hexagonkt.async.store.BenchmarkPgClientStore
|
|
import com.hexagonkt.async.store.BenchmarkPgClientStore
|
|
-import com.hexagonkt.http.server.vertx.VertxServerAdapter
|
|
|
|
|
|
+import com.hexagonkt.http.server.netty.epoll.async.NettyEpollServerAdapter
|
|
import com.hexagonkt.templates.rocker.RockerAdapter
|
|
import com.hexagonkt.templates.rocker.RockerAdapter
|
|
import io.netty.util.ResourceLeakDetector
|
|
import io.netty.util.ResourceLeakDetector
|
|
import io.netty.util.ResourceLeakDetector.Level.DISABLED
|
|
import io.netty.util.ResourceLeakDetector.Level.DISABLED
|
|
@@ -26,7 +26,7 @@ fun main() {
|
|
val store = BenchmarkPgClientStore("postgresql")
|
|
val store = BenchmarkPgClientStore("postgresql")
|
|
val templateEngine = RockerAdapter()
|
|
val templateEngine = RockerAdapter()
|
|
val templateUrl = URL("classpath:fortunes.rocker.html")
|
|
val templateUrl = URL("classpath:fortunes.rocker.html")
|
|
- val engine = VertxServerAdapter(preferNativeTransport = true)
|
|
|
|
|
|
+ val engine = NettyEpollServerAdapter(bossGroupThreads = 48)
|
|
|
|
|
|
val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
|
|
val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
|
|
benchmark.server.start()
|
|
benchmark.server.start()
|