Skip to content

Instantly share code, notes, and snippets.

View bfil's full-sized avatar

Bruno Filippone bfil

View GitHub Profile
@bfil
bfil / MetricsCollector.scala
Created April 3, 2016 17:34
Kamon Metrics Collector
import java.nio.LongBuffer
import akka.actor.{ActorLogging, Actor}
import kamon.metric._
import kamon.metric.instrument.{Histogram, CollectionContext}
class MetricsCollector extends Actor with ActorLogging {
import MetricsCollector._
def ms(nanos: Long) = nanos / 1000 / 1000
@bfil
bfil / EmbeddedMongo.scala
Created February 18, 2015 23:14
EmbeddedMongo for ReactiveMongo
import java.util.logging.Logger
import scala.concurrent.ExecutionContext
import de.flapdoodle.embed.mongo.{Command, MongodStarter}
import de.flapdoodle.embed.mongo.config.{MongodConfigBuilder, Net, RuntimeConfigBuilder}
import de.flapdoodle.embed.mongo.distribution.Version
import de.flapdoodle.embed.process.config.IRuntimeConfig
import de.flapdoodle.embed.process.config.io.ProcessOutput
import de.flapdoodle.embed.process.runtime.Network