I hereby claim:
- I am nremond on github.
- I am nremond (https://keybase.io/nremond) on keybase.
- I have a public key whose fingerprint is F977 A6FE 0378 5224 E90D 48E9 78AB 58AA 3102 58BC
To claim this, I am signing this object:
package basic | |
import com.excilys.ebi.gatling.core.Predef._ | |
import com.excilys.ebi.gatling.http.Predef._ | |
import akka.util.duration._ | |
import bootstrap._ | |
import scala.collection.mutable | |
// Simulation for the Play20 chat sample app | |
// cf : (https://github.com/playframework/Play20/tree/master/samples/scala/websocket-chat) |
import scala.collection.mutable | |
case class Node( | |
value: Option[Char] = None, | |
leaves: mutable.ArrayBuffer[String] = mutable.ArrayBuffer.empty, | |
nodes: mutable.ArrayBuffer[Node] = mutable.ArrayBuffer.empty) { | |
class AccountFeeder() extends com.excilys.ebi.gatling.core.feeder.Feeder { | |
import org.joda.time.DateTime | |
import scala.util.Random | |
private val RNG = new Random() | |
// random number in between [a...b] | |
def randInt(a:Int, b:Int) = RNG.nextInt(b-a) + a | |
def daysOfMonth(year:Int, month:Int) = new DateTime(year, month, 1, 0, 0, 0, 000).dayOfMonth().getMaximumValue() |
class TestSwitch { | |
String day; | |
public TestSwitch(String day) { | |
this.day = day; | |
} |
class TestSwitch { | |
public enum Day { | |
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY | |
} | |
Day day; |
I hereby claim:
To claim this, I am signing this object:
class NicoBench extends AbstractBenchmark { | |
val cacheUri = new ConcurrentHashMap[URI, Int] | |
@Test | |
@BenchmarkOptions(benchmarkRounds = 20000, warmupRounds = 5000, concurrency = 8) | |
def uri_hashcode() { | |
val uri = new URI("http://fake.com/" + ThreadLocalRandom.current.nextInt(0, 1000)) | |
cacheUri.putIfAbsent(uri, 123) | |
cacheUri.get(uri) |
object Nico2 { | |
import scala.concurrent.duration._ | |
/// | |
implicit class UserNumberImplicit(number: Int) { | |
def users = new UserNumber(number) | |
} | |
class UserNumber(val number: Int) |
import scala.testing.Benchmark | |
val a="aaa" | |
val b="bbb" | |
val c="ccc" | |
object Format1 extends Benchmark { | |
def run = String.format("%s - %s - %s\n", a, b, c) | |
} |
package basic | |
import com.excilys.ebi.gatling.core.Predef._ | |
import com.excilys.ebi.gatling.http.Predef._ | |
import bootstrap._ | |
class BasicExampleSimulation extends Simulation { | |
val counterFeeder = new Feeder[Int] { | |
private val gen = Stream.from(1).toIterator |