A metrics library for PureScript
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Abhinav Sarkar e94e6c745f Adds documentation and README 2 years ago
src/System Adds documentation and README 2 years ago
.gitignore Initial commit 2 years ago
LICENSE Adds LICENSE 2 years ago
README.md Adds documentation and README 2 years ago
bower.json Adds LICENSE 2 years ago

README.md

purescript-metrics

A metrics library for PureScript inspired by the Haskell library ekg. It is a wrapper upon the JavaScript metrics library which itself is a port of the Java Dropwizard metrics library.

API documentation can be found in Pursuit.

Sample Usage

main = do
  store <- newStore
  counter <- createOrGetCounter "counter" store
  gauge <- createOrGetGauge "gauge" (pure 3) store
  hist <- createOrGetHistogramWithExponentialDecaySampling "hist" 1028 0.015 store
  meter <- createOrGetMeter "meter" store
  timer <- createOrGetTimer "timer" store
  Counter.inc counter 2
  Histogram.update hist 1.2
  Histogram.update hist 2.1
  Meter.mark meter
  Timer.update timer (Milliseconds 1000.0)
  launchAff $ sample store >>= logShow