This file contains hidden or 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
Benchmarks with the immutable hashmap implementation: | |
[info] Benchmark (tagCount) Mode Cnt Score Error Units | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder 1 avgt 3 22.043 ± 7.807 ns/op | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder:·gc.alloc.rate 1 avgt 3 2967.178 ± 1062.190 MB/sec | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder:·gc.alloc.rate.norm 1 avgt 3 72.000 ± 0.001 B/op | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder:·gc.churn.PS_Eden_Space 1 avgt 3 2967.641 ± 1003.509 MB/sec | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder:·gc.churn.PS_Eden_Space.norm 1 avgt 3 72.012 ± 3.497 B/op | |
[info] TagSetCreationBenchmark.createTagSetFromBuilder:·gc.churn.PS_Survivor_Space |
This file contains hidden or 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
# An adaptive sampler tries to balance a global throughput goal across all partitions in the current application, | |
# making a best effort to fulfil the individual goals of each partition. | |
# | |
adaptive-sampler { | |
# The target maximum number of affirmative trace decisions to be taken by the sampler. The sampler will do a best | |
# effort to balance sampling decisions across all partitions to produce no more than this number of affirmative | |
# decisions. |
This file contains hidden or 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 kamon.Kamon | |
import slick.jdbc.PostgresProfile.api._ | |
import scala.concurrent.ExecutionContext | |
object SlickExample extends App { | |
// Definition of the SUPPLIERS table | |
class Suppliers(tag: Tag) extends Table[(Int, String, String, String, String, String)](tag, "SUPPLIERS") { | |
def id = column[Int]("SUP_ID", O.PrimaryKey) // This is the primary key column |
This file contains hidden or 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
// Goes into app/modules/SystemMetricsModule.scala | |
package modules | |
import javax.inject.{Inject, Singleton} | |
import kamon.system.SystemMetrics | |
import play.api.{Configuration, Environment, Logger} | |
import play.api.inject.{ApplicationLifecycle, Binding, Module} | |
import scala.concurrent.Future | |
class SystemMetricsModule extends Module { |
This file contains hidden or 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 com.typesafe.sbt.packager.Keys.{daemonGroup, dockerCmd} | |
import com.typesafe.sbt.packager.docker.{Cmd, CmdLike, ExecCmd} | |
dockerCommands := { | |
val dockerBaseDirectory = (defaultLinuxInstallLocation in Docker).value | |
val relativeBaseDirectory = dockerBaseDirectory.drop(1) | |
def relativeToBuild(file: String): String = relativeBaseDirectory + "/" + file | |
val fileMappings = scriptClasspathOrdering.value.toMap.map { case (k, v) => (k.getName, v)} | |
val projectArtifacts = projectDependencyArtifacts.value.map(f => fileMappings(f.data.getName)) |
This file contains hidden or 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
package kamontest | |
import akka.actor.{Props, ActorSystem, Actor} | |
import kamon.Kamon | |
import kamon.metric.SubscriptionsDispatcher.TickMetricSnapshot | |
object Main { | |
def main(args: Array[String]) { | |
Kamon.start() |
This file contains hidden or 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 akka.util.Timeout | |
import ChunkingActorCassandraIterator.{Click, Interval} | |
import akka.actor._ | |
import akka.io.Tcp | |
import java.util.Date | |
import kamon.trace.TraceRecorder | |
import org.json4s.DefaultFormats | |
import scala.concurrent.ExecutionContext | |
import scala.reflect.ClassTag | |
import scala.util.Try |