Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
ghcStats :: (MonadState Registry m, MonadIO m) => m (Maybe (IO ThreadId)) Source #
Register metrics that record internal GHC runtime metrics, and fork a new thread
to periodically update those metrics. Returns the ThreadId
of the monitoring
thread.
The following metrics will be registered:
ghc_bytes_allocated_total
: Total number of bytes allocatedghc_num_gcs_total
: Number of garbage collections performed (any generation, major and minor)ghc_max_bytes_used_total
: Maximum number of live bytes seen so farghc_num_byte_usage_samples_total
: Number of byte usage samples taken, or equivalently the number of major GCs performed.ghc_cumulative_bytes_used_total
: Sum of all byte usage samples, can be used with numByteUsageSamples to calculate averages with arbitrary weighting (if you are sampling this record multiple times).ghc_bytes_copied_total
: Number of bytes copied during GCghc_current_bytes_used
: Number of live bytes at the end of the last major GCghc_current_bytes_slop
: Current number of bytes lost to slopghc_max_bytes_slop_total
: Maximum number of bytes lost to slop at any one time so farghc_peak_bytes_allocated_total
: Maximum number of bytes allocatedghc_mutator_cpu_seconds_total
: CPU time spent running mutator threads. This does not include any profiling overhead or initialization.ghc_mutator_wall_seconds_total
: Wall clock time spent running mutator threads. This does not include initialization.ghc_gc_cpu_seconds_total
: CPU time spent running GCghc_gc_wall_seconds_total
: Wall clock time spent running GCghc_cpu_seconds_total
: Total CPU time elapsed since program startghc_wall_seconds_total
: Total wall clock time elapsed since startghc_par_bytes_copied_total
: Number of bytes copied during GC, minus space held by mutable lists held by the capabilities. Can be used with parMaxBytesCopied to determine how well parallel GC utilized all cores.ghc_par_max_bytes_copied_total
: Sum of number of bytes copied each GC by the most active GC thread each GC. The ratio of parTotBytesCopied divided by parMaxBytesCopied approaches 1 for a maximally sequential run and approaches the number of threads (set by the RTS flag -N) for a maximally parallel run.ghc_prometheus_collection_time_seconds
: Amount of time spent by the Prometheus library collecting GHC statisticsghc_prometheus_record_time_seconds
: Amount of time spent by the Prometheus library recording GHC statistics