← ZIO Profiling docs

zio.profiling.causal

Members list

Type members

Classlikes

final case class CausalProfiler(iterations: Int = ..., candidateSelector: String => Boolean = ..., samplingPeriod: Duration = ..., minExperimentDuration: Duration = ..., experimentTargetSamples: Int = ..., warmUpPeriod: Duration = ..., coolOffPeriod: Duration = ..., zeroSpeedupWeight: Int = ..., maxConsideredSpeedUp: Int = ..., sleepPrecision: Duration = ...)

A causal profiler inspired by https://github.com/plasma-umass/coz, that can be used to instrument code and automatically figure out which areas should be optimized to increase overall throughput.

A causal profiler inspired by https://github.com/plasma-umass/coz, that can be used to instrument code and automatically figure out which areas should be optimized to increase overall throughput.

The profiler will periodically select regions of code for optimization and will artifically speed them up by slowing down all code that runs concurrently with it. It will determine throughput based on the number of times that zio.profiling.causal.CausalProfiler.progressPoint has been invoked during an experiment.

Only zio.profiling.CostCenter will be considered for optimization, so make sure to tag the code.

Value parameters

candidateSelector

when a new experiment is about to be performed, this is used to decide on a candidate for optimization

coolOffPeriod

period of time to wait between experiments.

experimentTargetSamples

number of times every progress point should be invoked during an experiment. will be used to adjust duration of the next experiment.

iterations

the number of experiments to perform

maxConsideredSpeedUp

maximum speedup percentage that will be selected for experiments. Values over 100 do not have any practical use.

minExperimentDuration

minimum duration of an experiment

samplingPeriod

how often data about fiber locations gets collected. Lower values increase the overhead of the profiler.

sleepPrecision

estimated precision of Thread.sleep. The profiler will busy spin once it enters this proximity to the target time in order to increase accuraccy.

warmUpPeriod

period of time to delay start of the profiler.

zeroSpeedupWeight

rate of selecting no speedup for the experiment. A zeroSpeedupWeight of n means that that every nth experiment will have no speedup applied.

Attributes

Companion
object
Source
CausalProfiler.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
CausalProfiler.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ExperimentResult(selected: CostCenter, speedup: Float, duration: Long, effectiveDuration: Long, selectedSamples: Long, throughputData: List[ThroughputData], latencyData: List[LatencyData])

Attributes

Source
ExperimentResult.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class LatencyData(name: String, arrivals: Int, departures: Int)

Attributes

Source
LatencyData.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ProfilingResult(experiments: List[ExperimentResult])

Attributes

Source
ProfilingResult.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ThroughputData(name: String, delta: Int)

Attributes

Source
ThroughputData.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all