IdrisDoc: Effect.Perf

# Effect.Perf

A naive performance effect for gathering data about the
performance of effectful programmes.

timestamp : String -> Eff () [ PERF]

  Create a time stamp.

timerStuff' : TOpt -> Integer -> String -> Maybe String -> PMetrics -> PMetrics
stopTimer : String -> Eff () [ PERF]

  Stop a timer

startTimer : String -> Eff () [ PERF]

  Start a timer

splitTimerMsg : String -> String -> Eff () [ PERF]
splitTimer : String -> Eff () [ PERF]

  Split a timer

perfLog : PMetrics -> String -> IO ()
mkTimer : String -> Eff () [ PERF]
mkCounter : String -> Eff () [ PERF]

  Create a counter

incCounter' : String -> PMetrics -> PMetrics
incCounter : String -> Eff () [ PERF]

  Increment the counter

getPerfMetrics : Eff PMetrics [ PERF]

  Return gatheres metrics

displayTimerOpt : TOpt -> String
displayTimer : Timer -> String
displayPerfMetrics : PMetrics -> String
defaultTimer : String -> Timer
collectPMetricsOnly : Eff () [ PERF]

  Turn on performance metrics.

collectPMetricsAndShow : Eff () [ PERF]

  Turn on performance metrics and show during operation

collectPMetrics : Bool -> Eff () [ PERF]
record Timer

  A Simple timer.

  MkTimer : (desc : String) -> (start : Integer) -> (stop : Integer) -> (splits : List ( Integer, Maybe String)) -> Timer
  desc : (rec : Timer) -> String
  start : (rec : Timer) -> Integer
  stop : (rec : Timer) -> Integer
  splits : (rec : Timer) -> List ( Integer, Maybe String)
data TOpt : Type
  START : TOpt
  STOP : TOpt
  SPLIT : TOpt
data Perf : Effect
  GetMetrics : sig Perf PMetrics PMetrics
  TurnOn : Bool -> sig Perf () PMetrics PMetrics
  MkCounter : String -> sig Perf () PMetrics PMetrics
  IncCounter : String -> sig Perf () PMetrics PMetrics
  Timestamp : String -> sig Perf () PMetrics PMetrics
  MkStopWatch : String -> sig Perf () PMetrics PMetrics
  TimerStuff : TOpt -> String -> Maybe String -> sig Perf () PMetrics PMetrics
record PMetrics

  Performance Metrics to keep during program lifetime.

  MkPMetrics : (canPerf : Bool) -> (livePerf : Bool) -> (counters : List ( String, Nat)) -> (timers : List ( String, Timer)) -> (stime : Integer) -> (stamps : List ( String, Integer)) -> PMetrics
  canPerf : (rec : PMetrics) -> Bool
  livePerf : (rec : PMetrics) -> Bool
  counters : (rec : PMetrics) -> List ( String, Nat)
  timers : (rec : PMetrics) -> List ( String, Timer)
  stime : (rec : PMetrics) -> Integer
  stamps : (rec : PMetrics) -> List ( String, Integer)
PERF : EFFECT
MkTimer : (desc : String) -> (start : Integer) -> (stop : Integer) -> (splits : List ( Integer, Maybe String)) -> Timer
MkPMetrics : (canPerf : Bool) -> (livePerf : Bool) -> (counters : List ( String, Nat)) -> (timers : List ( String, Timer)) -> (stime : Integer) -> (stamps : List ( String, Integer)) -> PMetrics