Class/Object

com.reactific.hsp

Profiler

Related Docs: object Profiler | package hsp

Permalink

case class Profiler(name: String = "Default", enabled: Boolean = true) extends Product with Serializable

Profiler Module For Manual Code Instrumentation This module provides thread aware profiling at microsecond level granularity with manually inserted code Instrumentation. You can instrument a block of code by wrapping it in Profiling.profile("any name you like"). For example, like this:

Profiling.profile("Example Code") { "example code" }

The result of the Profiling.profile call will be whatever the block returns ("example code" in this case). You can print the results out with print_profile_data or log it with log_profile_data. Once printed or logged, the data is reset and a new capture starts. The printout is grouped by threads and nested Profiling.profile calls are accounted for. Note that when profiling_enabled is false, there is almost zero overhead. In particular, expressions involving computing the argument to profile method will not be computed because it is a functional by-name argument that is not evaluated if profiling is disabled.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Profiler
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Profiler(name: String = "Default", enabled: Boolean = true)

    Permalink

Type Members

  1. type SummaryMap = Seq[(String, Int, Int, Double, Double, Double)]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asyncEnd(what: ⇒ String, t0: Long): Unit

    Permalink
  6. def asyncStart: Long

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val enabled: Boolean

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def format_one_item(itemName: String): String

    Permalink
  12. def format_profile_data: StringBuilder

    Permalink
  13. def format_profile_summary: String

    Permalink
  14. def futureMap[S, B](what: ⇒ String, future: ⇒ Future[S])(block: (S) ⇒ B)(implicit ec: ExecutionContext): Future[B]

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def get_one_item(itemName: String): (Int, Double)

    Permalink
  17. final def in_profile_context: Boolean

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def log_profile_data(logger: Logger): Unit

    Permalink
  20. def log_profile_summary(log: Logger, summary_name: String): Unit

    Permalink
  21. def log_profile_summary(log: Logger): Unit

    Permalink
  22. val name: String

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def print_profile_data(out: PrintStream): Unit

    Permalink
  27. def print_profile_summary(out: PrintStream): Unit

    Permalink
  28. def profile[R](what: ⇒ String)(block: ⇒ R): R

    Permalink
  29. def profileF[R](what: ⇒ String)(block: ⇒ Future[R])(implicit ec: ExecutionContext): Future[R]

    Permalink
  30. def reset_profile_data(): Unit

    Permalink
  31. def summarize_profile_data: SummaryMap

    Permalink
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped