Skip to content

Commit 4baee2a

Browse files
authored
Merge pull request #16 from ocharles/master
Build with base-4.10
2 parents f55bf4a + 2f23b06 commit 4baee2a

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

System/Metrics.hs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ getGcStats = do
445445

446446
-- | Empty GC statistics, as if the application hasn't started yet.
447447
emptyGCStats :: Stats.GCStats
448+
# if MIN_VERSION_base(4,10,0)
448449
emptyGCStats = Stats.GCStats
449450
{ bytesAllocated = 0
450451
, numGcs = 0
@@ -464,7 +465,30 @@ emptyGCStats = Stats.GCStats
464465
, wallSeconds = 0
465466
, parTotBytesCopied = 0
466467
, parMaxBytesCopied = 0
468+
, mblocksAllocated = 0
467469
}
470+
# else
471+
emptyGCStats = Stats.GCStats
472+
{ bytesAllocated = 0
473+
, numGcs = 0
474+
, maxBytesUsed = 0
475+
, numByteUsageSamples = 0
476+
, cumulativeBytesUsed = 0
477+
, bytesCopied = 0
478+
, currentBytesUsed = 0
479+
, currentBytesSlop = 0
480+
, maxBytesSlop = 0
481+
, peakMegabytesAllocated = 0
482+
, mutatorCpuSeconds = 0
483+
, mutatorWallSeconds = 0
484+
, gcCpuSeconds = 0
485+
, gcWallSeconds = 0
486+
, cpuSeconds = 0
487+
, wallSeconds = 0
488+
, parTotBytesCopied = 0
489+
, parMaxBytesCopied = 0
490+
}
491+
# endif
468492
#else
469493
getGcStats = Stats.getGCStats
470494
#endif

ekg-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ library
3131

3232
build-depends:
3333
ghc-prim < 0.6,
34-
base >= 4.5 && < 4.10,
34+
base >= 4.5 && < 4.11,
3535
containers >= 0.5 && < 0.6,
3636
text < 1.3,
3737
unordered-containers < 0.3

0 commit comments

Comments
 (0)