/stats endpoint

This commit is contained in:
Michael Snoyman 2020-10-16 04:21:08 +03:00
parent c361328767
commit 98df84df28
No known key found for this signature in database
GPG Key ID: 907EAE2F42B52046
3 changed files with 10 additions and 0 deletions

View File

@ -61,3 +61,5 @@
/blog BlogHomeR GET
/blog/#Year/#Month/#Text BlogPostR GET
/blog/feed BlogFeedR GET
/stats StatsR GET

View File

@ -69,6 +69,7 @@ import Handler.Snapshots
import Handler.StackageHome
import Handler.StackageIndex
import Handler.StackageSdist
import Handler.Stats
import Handler.System
--import Network.Wai.Middleware.Prometheus (prometheus)

7
src/Handler/Stats.hs Normal file
View File

@ -0,0 +1,7 @@
module Handler.Stats (getStatsR) where
import GHC.Stats
import Import
getStatsR :: Handler String
getStatsR = liftIO $ show <$> getRTSStats