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
#!/bin/sh | |
# Run the benchmark with this as sbt start script, | |
# but change the paths (/home/nordwall) | |
# ~/bin/sbt-benchmark.sh | |
# > project akka-actor-tests | |
# > test-only akka.performance.microbench.TellThroughputPerformanceSpec | |
export JAVA=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java | |
export FLAGS="-server -Dfile.encoding=UTF8 -XX:+UseNUMA -XX:+UseCondCardMark -XX:-UseBiasedLocking" |
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 cats.data.State | |
import scalaz.zio.{DefaultRuntime, Task, ZIO} | |
type UserID = String | |
case class UserProfile(name:String) | |
trait Database[F[_]] { | |
def lookup(id: UserID): Task[F[UserProfile]] | |
def update(id: UserID, profile: UserProfile): Task[F[Unit]] | |
} |
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 cats.data.{State, StateT} | |
import scalaz.zio._ | |
type UserID = String | |
case class UserProfile(name:String) | |
trait Database { | |
def lookup(id: UserID): Task[UserProfile] | |
def update(id: UserID, profile: UserProfile): Task[Unit] | |
} |
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 scalaz.zio._ | |
type UserID = String | |
case class UserProfile(name: String) | |
//Companion object for below Database Module. | |
object Database { | |
// The database module contains the database service: | |
trait Service { | |
def lookup(id: UserID): Task[UserProfile] |
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 shapeless._ | |
import shapeless.ops.coproduct.Inject | |
// "com.chuusai" %% "shapeless" % "2.3.3" | |
object NodeBehaviourExecutor extends App { | |
sealed trait NodeData { | |
val id: String | |
} |
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 zio.{DefaultRuntime, Ref, Task, UIO, ZIO} | |
type FieldSchema = String | |
type FieldData = String | |
type GenerateTimestamp = Long | |
type GenerateUuid[T] = T | |
type UserID=String | |
type AccountID = String |
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 zio.{Has, Layer, Ref, Task, ZIO, ZLayer} | |
import zio._ | |
import zio.console._ | |
object ZIOInsteadOfFreeRewrite extends App { | |
type UserID = String | |
case class UserProfile(name: String) | |
//Base trait for all the operations that are to be recorded when running test | |
trait Operation | |
//The TestState |