packages feed

ridley 0.3.4.0 → 0.3.4.1

raw patch · 5 files changed

+45/−43 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ cbits/helpers.h view
@@ -0,0 +1,34 @@++#ifndef RIDLEY_HELPERS__+#define RIDLEY_HELPERS__++#ifdef __APPLE__++// Apple/Darwin specific code++#include <stdlib.h>++// A subset of if_data, as defined in <net/if_var.h>+struct ridley_if_data {+  u_int32_t   ridley_ifi_ipackets;       /* packets received on interface */+  u_int32_t   ridley_ifi_opackets;       /* packets sent on interface */+  u_int32_t   ridley_ifi_ierrors;        /* input errors on interface */+  u_int32_t   ridley_ifi_oerrors;        /* output errors on interface */+  u_int32_t   ridley_ifi_ibytes;         /* total number of octets received */+  u_int32_t   ridley_ifi_obytes;         /* total number of octets sent */+  u_int32_t   ridley_ifi_imcasts;        /* packets received via multicast */+  u_int32_t   ridley_ifi_omcasts;        /* packets sent via multicast */+  u_int32_t   ridley_ifi_iqdrops;        /* dropped on input, this interface */+  char*       ridley_ifi_name;           /* The interface name */+  int         ridley_ifi_error;          /* If there was an error */+};++typedef struct ridley_if_data ridley_if_data_t;++void free_ridley_if_data(ridley_if_data_t*, int);++// End of Apple/Darwin specific code++#endif++#endif
− include/helpers.h
@@ -1,34 +0,0 @@--#ifndef RIDLEY_HELPERS__-#define RIDLEY_HELPERS__--#ifdef __APPLE__--// Apple/Darwin specific code--#include <stdlib.h>--// A subset of if_data, as defined in <net/if_var.h>-struct ridley_if_data {-  u_int32_t   ridley_ifi_ipackets;       /* packets received on interface */-  u_int32_t   ridley_ifi_opackets;       /* packets sent on interface */-  u_int32_t   ridley_ifi_ierrors;        /* input errors on interface */-  u_int32_t   ridley_ifi_oerrors;        /* output errors on interface */-  u_int32_t   ridley_ifi_ibytes;         /* total number of octets received */-  u_int32_t   ridley_ifi_obytes;         /* total number of octets sent */-  u_int32_t   ridley_ifi_imcasts;        /* packets received via multicast */-  u_int32_t   ridley_ifi_omcasts;        /* packets sent via multicast */-  u_int32_t   ridley_ifi_iqdrops;        /* dropped on input, this interface */-  char*       ridley_ifi_name;           /* The interface name */-  int         ridley_ifi_error;          /* If there was an error */-};--typedef struct ridley_if_data ridley_if_data_t;--void free_ridley_if_data(ridley_if_data_t*, int);--// End of Apple/Darwin specific code--#endif--#endif
ridley.cabal view
@@ -1,19 +1,21 @@ name:                ridley-version:             0.3.4.0+version:             0.3.4.1 synopsis:            Quick metrics to grow your app strong. description:         A collection of Prometheus metrics to monitor your app. Please see README.md homepage:            https://github.com/iconnect/ridley#README license:             BSD3 license-file:        LICENSE author:              Alfredo Di Napoli & the IRIS Connect Engineering Team-maintainer:          chrisd@irisconnect.co.uk-copyright:           2022 IRIS Connect Ltd.+maintainer:          engineering@irisconnect.co.uk+copyright:           2023 IRIS Connect Ltd. category:            Web build-type:          Simple-data-files:-  include/helpers.h cabal-version:       >=1.10 +extra-source-files:+  cbits/helpers.c+  cbits/helpers.h+ flag lib-Werror      manual: True      default: False@@ -26,7 +28,6 @@  library   hs-source-dirs:      src-  include-dirs:        include   exposed-modules:     System.Metrics.Prometheus.Ridley                        System.Metrics.Prometheus.Ridley.Types                        System.Metrics.Prometheus.Ridley.Metrics.Memory@@ -62,6 +63,7 @@                        vector,                        unix,                        unliftio-core+  include-dirs:        cbits   c-sources:           cbits/helpers.c   cc-options:          -Wall -std=c99   default-language:    Haskell2010
src/System/Metrics/Prometheus/Ridley/Metrics/Network/Darwin.hs view
@@ -128,6 +128,9 @@        |]   return (res, totalInterfaces) +foreign import ccall "helpers.h free_ridley_if_data"+  freeRidleyIFData :: Ptr IfData -> CInt -> IO ()+ -------------------------------------------------------------------------------- getNetworkMetrics :: IO ([IfData], IO ()) getNetworkMetrics = do
src/System/Metrics/Prometheus/Ridley/Metrics/Network/Types.hsc view
@@ -54,9 +54,6 @@   #ifdef darwin_HOST_OS-foreign import ccall "helpers.h free_ridley_if_data"-  freeRidleyIFData :: Ptr IfData -> CInt -> IO ()- instance Storable IfData where   sizeOf _ = #{size ridley_if_data_t}   alignment _ = #{alignment ridley_if_data_t}