mirror of
https://github.com/facebook/Haxl.git
synced 2024-12-23 16:53:02 +03:00
add show instances for core types
Summary: add show instances for core types Reviewed By: JonCoens Differential Revision: D3613250 fbshipit-source-id: aa3bacdbb938666352859078ccf93fc24f3e8652
This commit is contained in:
parent
3cc0b3e054
commit
10623dc6ee
@ -155,7 +155,7 @@ type Round = Int
|
|||||||
|
|
||||||
-- | Stats that we collect along the way.
|
-- | Stats that we collect along the way.
|
||||||
newtype Stats = Stats [RoundStats]
|
newtype Stats = Stats [RoundStats]
|
||||||
deriving ToJSON
|
deriving (Show, ToJSON)
|
||||||
|
|
||||||
-- | Pretty-print Stats.
|
-- | Pretty-print Stats.
|
||||||
ppStats :: Stats -> String
|
ppStats :: Stats -> String
|
||||||
@ -183,6 +183,7 @@ data RoundStats
|
|||||||
{ fetchReq :: String
|
{ fetchReq :: String
|
||||||
, fetchStack :: [String]
|
, fetchStack :: [String]
|
||||||
}
|
}
|
||||||
|
deriving (Show)
|
||||||
|
|
||||||
-- | Pretty-print RoundStats.
|
-- | Pretty-print RoundStats.
|
||||||
ppRoundStats :: RoundStats -> String
|
ppRoundStats :: RoundStats -> String
|
||||||
@ -209,7 +210,7 @@ data DataSourceRoundStats = DataSourceRoundStats
|
|||||||
, dataSourceTime :: Maybe Microseconds
|
, dataSourceTime :: Maybe Microseconds
|
||||||
, dataSourceFailures :: Maybe Int
|
, dataSourceFailures :: Maybe Int
|
||||||
, dataSourceAllocation :: Maybe Int
|
, dataSourceAllocation :: Maybe Int
|
||||||
}
|
} deriving (Show)
|
||||||
|
|
||||||
-- | Pretty-print DataSourceRoundStats
|
-- | Pretty-print DataSourceRoundStats
|
||||||
ppDataSourceRoundStats :: DataSourceRoundStats -> String
|
ppDataSourceRoundStats :: DataSourceRoundStats -> String
|
||||||
|
Loading…
Reference in New Issue
Block a user