Skip to content

Commit

Permalink
Fix an example in the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adetokunbo committed Jan 16, 2024
1 parent a3292ea commit 3efea93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,18 @@ main :: IO ()
main = showUsageOf 96334 -- replace with your own process ID
```

#### Example: periodically check the memory of a processes
#### Example: periodically check the memory of some processes

```haskell
import Data.List.NonEmpty (NonEmpty)
import Data.List.NonEmpty (NonEmpty, (:|))
import System.MemInfo (
mkReportBud,
printUsage,
unfoldMemUsageAfter,
ProcessID
)

-- | Use 'unfoldMemUsageAfter' to periodically read the memory usage
-- | Use 'unfoldMemUsageAfter' to periodically read memory usage
monitorRamOf :: NonEmpty ProcessID -> IO ()
monitorRamOf pids = do
budMb <- mkReportBud pids
Expand All @@ -203,7 +203,7 @@ monitorRamOf pids = do
go bud

main :: IO ()
main = monitorRamOf 96334 -- replace with your own process ID
main = monitorRamOf $ 96334 :| [96335]-- replace with your own process IDs
```


Expand Down

0 comments on commit 3efea93

Please sign in to comment.