diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dhtd.hs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 275479f4..17e62cd7 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -485,28 +485,28 @@ clientSession s@Session{..} sock cnum h = do | |||
485 | "gc" -> do hPutClient h "Performing garbage collection..." | 485 | "gc" -> do hPutClient h "Performing garbage collection..." |
486 | performMajorGC | 486 | performMajorGC |
487 | "" -> do | 487 | "" -> do |
488 | is_enabled <- getRTSStatsEnabled | 488 | is_enabled <- getGCStatsEnabled |
489 | if is_enabled | 489 | if is_enabled |
490 | then do | 490 | then do |
491 | RTSStats{..} <- getRTSStats | 491 | GCStats{..} <- getGCStats |
492 | let r = [ ("bytesAllocated", show allocated_bytes) | 492 | let r = [ ("bytesAllocated", show bytesAllocated) |
493 | , ("numGcs", show gcs) | 493 | , ("numGcs", show numGcs) |
494 | , ("maxBytesUsed", show max_live_bytes) | 494 | , ("maxBytesUsed", show maxBytesUsed) |
495 | --, ("numByteUsageSamples", show numByteUsageSamples) | 495 | , ("numByteUsageSamples", show numByteUsageSamples) |
496 | , ("cumulativeBytesUsed", show cumulative_live_bytes) | 496 | , ("cumulativeBytesUsed", show cumulativeBytesUsed) |
497 | , ("bytesCopied", show copied_bytes) | 497 | , ("bytesCopied", show bytesCopied) |
498 | , ("currentBytesUsed", show allocated_bytes) | 498 | , ("currentBytesUsed", show currentBytesUsed) |
499 | --, ("currentBytesSlop", show currentBytesSlop) | 499 | , ("currentBytesSlop", show currentBytesSlop) |
500 | , ("maxBytesSlop", show max_slop_bytes) | 500 | , ("maxBytesSlop", show maxBytesSlop) |
501 | -- , ("peakMegabytesAllocated", show peakMegabytesAllocated) | 501 | , ("peakMegabytesAllocated", show peakMegabytesAllocated) |
502 | , ("mutatorCpuNanoseconds", show mutator_cpu_ns) | 502 | , ("mutatorCpuSeconds", show mutatorCpuSeconds) |
503 | , ("mutatorWallNanoseconds", show mutator_elapsed_ns) | 503 | , ("mutatorWallSeconds", show mutatorWallSeconds) |
504 | , ("gcCpuSeconds", show gc_cpu_ns) | 504 | , ("gcCpuSeconds", show gcCpuSeconds) |
505 | , ("gcWallSeconds", show gc_elapsed_ns) | 505 | , ("gcWallSeconds", show gcWallSeconds) |
506 | , ("cpuSeconds", show cpu_ns) | 506 | , ("cpuSeconds", show cpuSeconds) |
507 | , ("wallSeconds", show elapsed_ns) | 507 | , ("wallSeconds", show wallSeconds) |
508 | , ("parTotBytesCopied", show par_copied_bytes) | 508 | , ("parTotBytesCopied", show parTotBytesCopied) |
509 | , ("parMaxBytesCopied", show cumulative_par_max_copied_bytes) | 509 | , ("parMaxBytesCopied", show parMaxBytesCopied) |
510 | ] | 510 | ] |
511 | hPutClient h $ showReport r | 511 | hPutClient h $ showReport r |
512 | else hPutClient h "Run with +RTS -T to obtain live memory-usage information." | 512 | else hPutClient h "Run with +RTS -T to obtain live memory-usage information." |