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
{ | |
"request_at": "2014-11-03T10:00:00Z", | |
"request_hierarchy": [ | |
"0/127.0.0.1/", | |
"1/127.0.0.1/hello" | |
] | |
} |
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
class TakeWhileBenchmark { | |
def takeWhile1[A](list: List[A])(f: A => Boolean): List[A]= { | |
@tailrec | |
def go(list: List[A], acc: List[A]): List[A] = { | |
list match { | |
case x :: xs if f(x) => go(xs, x :: acc) | |
case _ => acc | |
} | |
} |
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 scala.concurrent.duration._ | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ | |
class TodoListSimulation extends Simulation { | |
val httpProtocol = http |
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
const R = require('ramda'); | |
const test = require('ava'); | |
//not working | |
const fromListToMap = R.reduce((acc, attr) => { | |
acc[attr.name] = attr.value | |
return acc | |
}, {}) | |
//working |