haskoin-store 0.64.1 → 0.64.2
raw patch · 7 files changed
+49/−45 lines, 7 filesdep ~haskoin-store-dataPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: haskoin-store-data
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- haskoin-store.cabal +4/−4
- src/Haskoin/Store/BlockStore.hs +4/−4
- src/Haskoin/Store/Cache.hs +11/−11
- src/Haskoin/Store/Common.hs +12/−12
- src/Haskoin/Store/Stats.hs +11/−11
- src/Haskoin/Store/Web.hs +3/−3
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## 0.64.2+### Changed+- Replace dots for underscores in metrics.+ ## 0.64.1 ### Changed - Automatic formatting.
haskoin-store.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: haskoin-store-version: 0.64.1+version: 0.64.2 synopsis: Storage and index for Bitcoin and Bitcoin Cash description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category: Bitcoin, Finance, Network@@ -60,7 +60,7 @@ , hashable >=1.3.0.0 , haskoin-core >=0.21.1 , haskoin-node >=0.17.0- , haskoin-store-data ==0.64.1+ , haskoin-store-data ==0.64.2 , hedis >=0.12.13 , http-types >=0.12.3 , lens >=4.18.1@@ -116,7 +116,7 @@ , haskoin-core >=0.21.1 , haskoin-node >=0.17.0 , haskoin-store- , haskoin-store-data ==0.64.1+ , haskoin-store-data ==0.64.2 , hedis >=0.12.13 , http-types >=0.12.3 , lens >=4.18.1@@ -177,7 +177,7 @@ , haskoin-core >=0.21.1 , haskoin-node >=0.17.0 , haskoin-store- , haskoin-store-data ==0.64.1+ , haskoin-store-data ==0.64.2 , hedis >=0.12.13 , hspec >=2.7.1 , http-types >=0.12.3
src/Haskoin/Store/BlockStore.hs view
@@ -229,10 +229,10 @@ newStoreMetrics :: MonadIO m => Metrics.Store -> m StoreMetrics newStoreMetrics s = liftIO $ do- storeHeight <- g "height"- headersHeight <- g "headers"- storePendingTxs <- g "pending_txs"- storePeersConnected <- g "peers_connected"+ storeHeight <- g "blockchain_height"+ headersHeight <- g "blockchain_headers"+ storePendingTxs <- g "mempool_pending_txs"+ storePeersConnected <- g "network_peers_connected" storeMempoolSize <- g "mempool_size" return StoreMetrics{..} where
src/Haskoin/Store/Cache.hs view
@@ -205,17 +205,17 @@ newCacheMetrics :: MonadIO m => Metrics.Store -> m CacheMetrics newCacheMetrics s = liftIO $ do- cacheHits <- c "cache.hits"- cacheMisses <- c "cache.misses"- cacheLockAcquired <- c "cache.lock_acquired"- cacheLockReleased <- c "cache.lock_released"- cacheLockFailed <- c "cache.lock_failed"- cacheIndexTime <- d "cache.index"- cacheBlockSyncTime <- d "cache.block_sync"- cacheXPubBals <- c "cache.xpub_bals"- cacheXPubUnspents <- c "cache.xpub_unspents"- cacheXPubTxs <- c "cache.xpub_txs"- cacheXPubTxCount <- c "cache.xpub_tx_count"+ cacheHits <- c "cache_hits"+ cacheMisses <- c "cache_misses"+ cacheLockAcquired <- c "cache_lock_acquired"+ cacheLockReleased <- c "cache_lock_released"+ cacheLockFailed <- c "cache_lock_failed"+ cacheIndexTime <- d "cache_index"+ cacheBlockSyncTime <- d "cache_block_sync"+ cacheXPubBals <- c "cache_xpub_balsances"+ cacheXPubUnspents <- c "cache_xpub_unspents"+ cacheXPubTxs <- c "cache_xpub_txs"+ cacheXPubTxCount <- c "cache_xpub_tx_count" return CacheMetrics{..} where c x = Metrics.createCounter x s
src/Haskoin/Store/Common.hs view
@@ -448,16 +448,16 @@ createDataMetrics :: MonadIO m => Metrics.Store -> m DataMetrics createDataMetrics s = liftIO $ do- dataBestCount <- Metrics.createCounter "data.best_block" s- dataBlockCount <- Metrics.createCounter "data.blocks" s- dataTxCount <- Metrics.createCounter "data.txs" s- dataSpenderCount <- Metrics.createCounter "data.spenders" s- dataMempoolCount <- Metrics.createCounter "data.mempool" s- dataBalanceCount <- Metrics.createCounter "data.balances" s- dataUnspentCount <- Metrics.createCounter "data.unspents" s- dataAddrTxCount <- Metrics.createCounter "data.address_txs" s- dataXPubBals <- Metrics.createCounter "data.xpub_balances" s- dataXPubUnspents <- Metrics.createCounter "data.xpub_unspents" s- dataXPubTxs <- Metrics.createCounter "data.xpub_txs" s- dataXPubTxCount <- Metrics.createCounter "data.xpub_tx_count" s+ dataBestCount <- Metrics.createCounter "data_best_block" s+ dataBlockCount <- Metrics.createCounter "data_blocks" s+ dataTxCount <- Metrics.createCounter "data_txs" s+ dataSpenderCount <- Metrics.createCounter "data_spenders" s+ dataMempoolCount <- Metrics.createCounter "data_mempool" s+ dataBalanceCount <- Metrics.createCounter "data_balances" s+ dataUnspentCount <- Metrics.createCounter "data_unspents" s+ dataAddrTxCount <- Metrics.createCounter "data_address_txs" s+ dataXPubBals <- Metrics.createCounter "data_xpub_balances" s+ dataXPubUnspents <- Metrics.createCounter "data_xpub_unspents" s+ dataXPubTxs <- Metrics.createCounter "data_xpub_txs" s+ dataXPubTxCount <- Metrics.createCounter "data_xpub_tx_count" s return DataMetrics{..}
src/Haskoin/Store/Stats.hs view
@@ -98,47 +98,47 @@ let metrics = HashMap.fromList [- ( t <> ".query_count"+ ( t <> "_request_count" , Counter . statQueries ) ,- ( t <> ".item_count"+ ( t <> "_item_count" , Counter . statItems ) ,- ( t <> ".errors.client"+ ( t <> "_errors_client" , Counter . statClientErrors ) ,- ( t <> ".errors.server"+ ( t <> "_errors_server" , Counter . statServerErrors ) ,- ( t <> ".mean_ms"+ ( t <> "_mean_ms" , Gauge . mean . statTimes ) ,- ( t <> ".avg_ms"+ ( t <> "_avg_ms" , Gauge . avg . statTimes ) ,- ( t <> ".max_ms"+ ( t <> "_max_ms" , Gauge . maxi . statTimes ) ,- ( t <> ".min_ms"+ ( t <> "_min_ms" , Gauge . mini . statTimes ) ,- ( t <> ".p90max_ms"+ ( t <> "_p90max_ms" , Gauge . p90max . statTimes ) ,- ( t <> ".p90avg_ms"+ ( t <> "_p90avg_ms" , Gauge . p90avg . statTimes ) ,- ( t <> ".var_ms"+ ( t <> "_var_ms" , Gauge . var . statTimes ) ]
src/Haskoin/Store/Web.hs view
@@ -410,12 +410,12 @@ statPeers <- d "peers" statDbstats <- d "dbstats" - statEvents <- g "events.connected"+ statEvents <- g "events_connected" statKey <- V.newKey return WebMetrics{..} where- d x = createStatDist ("web." <> x) s- g x = Metrics.createGauge ("web." <> x) s+ d x = createStatDist ("web_" <> x) s+ g x = Metrics.createGauge ("web_" <> x) s withGaugeIO :: MonadUnliftIO m => Metrics.Gauge -> m a -> m a withGaugeIO g =