metrics 0.1.0.0 → 0.2.0.0
raw patch · 4 files changed
+15/−10 lines, 4 filesdep +bytestringdep ~ansi-terminaldep ~basedep ~lens
Dependencies added: bytestring
Dependency ranges changed: ansi-terminal, base, lens, mwc-random
Files
- metrics.cabal +8/−7
- src/Data/HealthCheck.hs +1/−0
- src/Data/Metrics.hs +0/−3
- src/Data/Metrics/Registry.hs +6/−0
metrics.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: metrics-version: 0.1.0.0+version: 0.2.0.0 synopsis: High-performance application metric tracking description: A port of Coda Hale's excellent metrics library for the JVM@@ -53,7 +53,7 @@ -- other-modules: -- other-extensions: - build-depends: base >=4.6 && <4.7,+ build-depends: base < 5, unordered-containers, text, mtl,@@ -64,8 +64,9 @@ vector-algorithms, containers, time,- lens >= 3.10 && < 4,- ansi-terminal >= 0.6 && < 0.7+ lens,+ ansi-terminal,+ bytestring hs-source-dirs: src default-language: Haskell2010 @@ -74,13 +75,13 @@ -- other-modules: CounterTest, ExponentiallyDecayingReservoirTest, GaugeTest, HistogramTest, MeterTest, RegistryTest, TimerTest hs-source-dirs: tests type: exitcode-stdio-1.0- build-depends: base >= 4.6 && <5,+ build-depends: base, metrics, async,- mwc-random >= 0.13,+ mwc-random, unix, QuickCheck, primitive,- lens >= 3.10 && < 4+ lens default-language: Haskell2010 ghc-options: -rtsopts -threaded -with-rtsopts=-N
src/Data/HealthCheck.hs view
@@ -57,3 +57,4 @@ -- | Create a health check. healthCheck :: Text -> IO StatusReport -> HealthCheck healthCheck = flip HealthCheck+
src/Data/Metrics.hs view
@@ -28,9 +28,6 @@ import Data.Metrics.Timer import Data.Metrics.Types ---newMetricRegistry :: IO (MetricRegistry IO)---newMetricRegistry = fmap MetricRegistry $ newMVar H.empty- {- getOrInit :: (Typeable a, MetricOutput a) => MetricRegistry -> Text -> a -> IO (Maybe (IORef a)) getOrInit r name conv defaultValue = do
src/Data/Metrics/Registry.hs view
@@ -4,6 +4,8 @@ MetricRegistry, Metric(..), Register(..),+ metrics,+ newMetricRegistry, module Data.Metrics.Types ) where import Control.Concurrent.MVar@@ -15,6 +17,10 @@ import Data.Metrics.Timer import Data.Metrics.Types import Data.Text (Text)++-- | Initializes a new metric registry.+newMetricRegistry :: IO (MetricRegistry IO)+newMetricRegistry = fmap MetricRegistry $ newMVar H.empty -- | A container that tracks all metrics registered with it. -- All forms of metrics share the same namespace in the registry.