- YourKit
- Add
Thread.sleep(60000)
to the START and END of the method you want to profile.
case class Product(id: Int, price: Int, inStock: Boolean) | |
case class Basket(productIds: List[Int]) | |
trait ProductRepo { | |
def getProduct(productId: Int): Product | |
} | |
trait ShoppingBasketRepo { |
# -*-Shell-script-*- | |
# | |
# functions This file contains functions to be used by most or all | |
# shell scripts in the /etc/init.d directory. | |
# | |
TEXTDOMAIN=initscripts | |
# Make sure umask is sane | |
umask 022 |
def run() = { | |
import scala.concurrent.{ blocking, ExecutionContext, Future } | |
implicit val ec = ExecutionContext.fromExecutor(java.util.concurrent.Executors.newFixedThreadPool(1)) | |
val startTime = System.nanoTime() | |
def event(name: String) = | |
Console.println(s"t=${(System.nanoTime - startTime) / 1000000000}s | $name") | |
event("REPORT request RCVD") | |
val candidates = 1 to 10 |
def run() = { | |
import scala.concurrent.{ blocking, ExecutionContext, Future } | |
implicit val ec = ExecutionContext.fromExecutor(java.util.concurrent.Executors.newFixedThreadPool(1)) | |
val startTime = System.nanoTime() | |
def event(name: String) = | |
Console.println(s"t=${(System.nanoTime - startTime) / 1000000000}s | $name") | |
event("REPORT request RCVD") | |
val candidates = 1 to 10 |