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
object Endpoints { | |
val routes = | |
get("healthcheck")(healthcheck _) :+: | |
get("greet" / param("name"))(greeter _) | |
def healthcheck() { Ok() } | |
def greeter(name: String) { Ok(s"Hello, $name!") } | |
} |
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
[info] Running org.openjdk.jmh.Main -i 10 -wi 10 -f 2 -t 1 io.finch.benchmarks.service.argonaut.* | |
[error] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0 | |
[info] # JMH 1.9.1 (released 152 days ago, please consider updating!) | |
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/bin/java | |
[info] # VM options: -Djava.net.preferIPv4Stack=true -XX:+AggressiveOpts -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=1024m -Xss8M -Xms512M -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -Xss8M -Xms512M -Xmx2G | |
[info] # Warmup: 10 iterations, 1 s each | |
[info] # Measurement: 10 iterations, 1 s each | |
[info] # Timeout: 10 min per iteration | |
[info] # Threads: 1 thread, will synchronize iterations | |
[info] # Benchmark mode: Average time, time/op |
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
[info] Running org.openjdk.jmh.Main -i 10 -wi 10 -f 2 -t 1 io.finch.benchmarks.service.argonaut.* | |
[error] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0 | |
[info] # JMH 1.9.1 (released 152 days ago, please consider updating!) | |
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/bin/java | |
[info] # VM options: -Djava.net.preferIPv4Stack=true -XX:+AggressiveOpts -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=1024m -Xss8M -Xms512M -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -Xss8M -Xms512M -Xmx2G | |
[info] # Warmup: 10 iterations, 1 s each | |
[info] # Measurement: 10 iterations, 1 s each | |
[info] # Timeout: 10 min per iteration | |
[info] # Threads: 1 thread, will synchronize iterations | |
[info] # Benchmark mode: Average time, time/op |
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.*; | |
class Graph { | |
public static void main(String... args) { | |
Graph graph = new Graph(); | |
graph.addNodes('A', 'B', 'C', 'D' ,'E'); | |
graph.addEdge('A', 'B'); | |
graph.addEdge('A', 'C'); | |
graph.addEdge('B', 'D'); |
NewerOlder