Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,402
    • Issues 5,402
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 590
    • Merge requests 590
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Wiki
  • Event log
  • live monitoring

live monitoring · Changes

Page history
Edit EventLog/LiveMonitoring authored Jul 22, 2014 by Simon Peyton Jones's avatar Simon Peyton Jones
Hide whitespace changes
Inline Side-by-side
event-log/live-monitoring.md
View page @ 27b82e5a
......@@ -111,36 +111,36 @@ Here we have possible API implementations. Keep in mind that all this is a work
### ghc-events
```wiki
-------------- Private -------------
data SequenceDecoder a =
FailS !B.ByteString !ByteOffset String
| SingleS (Maybe a) (B.ByteString -> SequenceDecoder a)
| DoneS !B.ByteString !ByteOffset (Maybe a)
eventLogDecoder :: Decoder (SequenceDecoder Event)
newtype EventHandle = EventHandle Header Handle
-------------- Public --------------
Client API relevant to real-time event monitoring. The full API is larger; you can find it in the [ ghc-events library documentation](https://hackage.haskell.org/package/ghc-events).
```wiki
-- Datatype that holds a link to the eventlog
data EventHandle
data EventHandle -- Abstract
data Event = .... -- Concrete data type (see the ghc-events library docs above)
-- Opens the event stream from the specified handle,
-- reads the header info, and initialises the EventHandle
openEventHandle :: Handle -> IO EventHandle
-- Gets the header of the log
getHeader :: EventHandle -> Header
-- Reads one event from the handle. Returns Nothing if no events
-- are readable from the log
getEvent :: EventHandle -> IO (Maybe Event)
```
### Implementing the API in ghc-events
```wiki
-------------- Private -------------
data SequenceDecoder a =
FailS !B.ByteString !ByteOffset String
| SingleS (Maybe a) (B.ByteString -> SequenceDecoder a)
| DoneS !B.ByteString !ByteOffset (Maybe a)
eventLogDecoder :: Decoder (SequenceDecoder Event)
newtype EventHandle = EventHandle Header Handle
```
### RTS
......
Clone repository Edit sidebar
  • Adventures in GHC compile times
  • All things layout
  • AndreasK
  • AndreasPK
  • Back End and Run Time System
  • Backpack refactoring
  • Backpack units
  • Brief Guide for Compiling GHC to iOS
  • Building GHC on Windows with Stack protector support (SSP) (using Make)
  • CAFs
  • CafInfo rework
  • Compiling Case Expressions in ghc
  • Compiling Data.Aeson Error
  • Contributing a Patch
  • Core interface section
View All Pages