@@ -68,7 +68,6 @@ module System.Metrics
6868 , Value (.. )
6969 ) where
7070
71- import Control.Applicative ((<$>) )
7271import Control.Monad (forM )
7372import qualified Data.IntMap.Strict as IM
7473import Data.IORef (IORef , atomicModifyIORef , newIORef , readIORef )
@@ -470,20 +469,16 @@ registerGcMetrics =
470469#if MIN_VERSION_base(4,11,0)
471470 , (" rts.gc.par_balanced_bytes_copied" , Gauge . fromIntegral . Stats. cumulative_par_balanced_copied_bytes)
472471#if MIN_VERSION_base(4,15,0)
473- , (" rts.gc.nm.sync_cpu_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_cpu_ns)
474- , (" rts.gc.nm.sync_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_elapsed_ns)
475- , (" rts.gc.nm.sync_max_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_max_elapsed_ns)
476- , (" rts.gc.nm.cpu_ms" , Counter . nsToMs . Stats. nonmoving_gc_cpu_ns)
477- , (" rts.gc.nm.elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_elapsed_ns)
478- , (" rts.gc.nm.max_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_max_elapsed_ns)
472+ , (" rts.gc.nm.sync_cpu_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_sync_cpu_ns)
473+ , (" rts.gc.nm.sync_elapsed_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_sync_elapsed_ns)
474+ , (" rts.gc.nm.sync_max_elapsed_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_sync_max_elapsed_ns)
475+ , (" rts.gc.nm.cpu_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_cpu_ns)
476+ , (" rts.gc.nm.elapsed_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_elapsed_ns)
477+ , (" rts.gc.nm.max_elapsed_ms" , Counter . nsToMs . fromIntegral . Stats. nonmoving_gc_max_elapsed_ns)
479478# endif
480479# endif
481480 ])
482481 getRTSStats
483- where
484- -- | Convert nanoseconds to milliseconds.
485- nsToMs :: Int64 -> Int64
486- nsToMs s = round (realToFrac s / (1000000.0 :: Double ))
487482#else
488483 (M. fromList
489484 [ (" rts.gc.bytes_allocated" , Counter . Stats. bytesAllocated)
0 commit comments