Skip to content

Commit

Permalink
Merge pull request #2 from tracsis/add-current-mem-metric
Browse files Browse the repository at this point in the history
add current_mem_used
  • Loading branch information
TeofilC authored May 10, 2022
2 parents fd082bf + d942199 commit cf89629
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion System/Metrics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ registerGcMetrics store =
#if MIN_VERSION_base(4,12,0)
, ("rts.gc.init_cpu_ms" , Counter . nsToMs . Stats.init_cpu_ns)
, ("rts.gc.init_wall_ms" , Counter . nsToMs . Stats.init_elapsed_ns)
, ("rts.gc.current_mem_used" , Gauge . fromIntegral . Stats.gcdetails_mem_in_use_bytes . Stats.gc) -- rts memory in use in bytes
#endif
, ("rts.gc.mutator_cpu_ms" , Counter . nsToMs . Stats.mutator_cpu_ns)
, ("rts.gc.mutator_wall_ms" , Counter . nsToMs . Stats.mutator_elapsed_ns)
Expand All @@ -440,7 +441,7 @@ registerGcMetrics store =
, ("rts.gc.cpu_ms" , Counter . nsToMs . Stats.cpu_ns)
, ("rts.gc.wall_ms" , Counter . nsToMs . Stats.elapsed_ns)
, ("rts.gc.max_bytes_used" , Gauge . fromIntegral . Stats.max_live_bytes)
, ("rts.gc.current_bytes_used" , Gauge . fromIntegral . Stats.gcdetails_live_bytes . Stats.gc)
, ("rts.gc.current_bytes_used" , Gauge . fromIntegral . Stats.gcdetails_live_bytes . Stats.gc)
, ("rts.gc.current_bytes_slop" , Gauge . fromIntegral . Stats.gcdetails_slop_bytes . Stats.gc)
, ("rts.gc.max_bytes_slop" , Gauge . fromIntegral . Stats.max_slop_bytes)
, ("rts.gc.peak_megabytes_allocated" , Gauge . fromIntegral . (`quot` (1024*1024)) . Stats.max_mem_in_use_bytes)
Expand Down

0 comments on commit cf89629

Please sign in to comment.