| Copyright | (C) 2026 Edward Kmett |
|---|---|
| License | UPL-1.0 AND BSD-3-Clause |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | GHC FFI; THC runtime services or native fallback implementation |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
THC.GC
Description
JVM-wide collector statistics. These queries neither force a collection nor enable monitoring. Values are independently sampled and cumulative.
Synopsis
- data Available a
- = Available a
- | Unsupported
- | Disabled
- | Denied
- | Unavailable
- data CollectorStats = CollectorStats {}
- collectors :: IO (Available [CollectorStats])
Documentation
An absent metric is not zero. Queries never enable JVM-wide monitoring.
fmap transforms a genuine value and preserves every non-value status:
>>>fmap (+ 1) (Available (41 :: Int))Available 42>>>fmap (+ 1) (Disabled :: Available Int)Disabled>>>map (fmap (+ 1)) [Unsupported, Disabled, Denied, Unavailable :: Available Int][Unsupported,Disabled,Denied,Unavailable]
Constructors
| Available a | A genuine value; its scope is specified by the query. |
| Unsupported | The runtime or provider does not implement this service. |
| Disabled | Supported, but its instrumentation or sink is switched off. |
| Denied | The current context or host security policy forbids access. |
| Unavailable | Normally supported, but no value is currently available. |
Instances
| Functor Available # | |
| Eq a => Eq (Available a) # | |
| Ord a => Ord (Available a) # | |
Defined in THC.Runtime.Types | |
| Show a => Show (Available a) # | |
data CollectorStats Source #
One JVM collector's name and cumulative counters, each independently available. A collector can disappear or decline to expose a counter.
Constructors
| CollectorStats | |
Fields
| |
Instances
| Eq CollectorStats # | |
Defined in THC.GC Methods (==) :: CollectorStats -> CollectorStats -> Bool # (/=) :: CollectorStats -> CollectorStats -> Bool # | |
| Show CollectorStats # | |
Defined in THC.GC Methods showsPrec :: Int -> CollectorStats -> ShowS # show :: CollectorStats -> String # showList :: [CollectorStats] -> ShowS # | |
collectors :: IO (Available [CollectorStats]) Source #
Enumerate collectors. Individual optional/invalidated counters retain their own status. An empty available list is different from no JVM support.