|Copyright||(c) 2009-2014 Bryan O'Sullivan|
Input and output actions.
- header :: ByteString
- headerRoot :: String
- critVersion :: String
- hGetRecords :: Binary a => Handle -> IO (Either String [a])
- hPutRecords :: Binary a => Handle -> [a] -> IO ()
- readRecords :: Binary a => FilePath -> IO (Either String [a])
- writeRecords :: Binary a => FilePath -> [a] -> IO ()
- type ReportFileContents = (String, String, [Report])
- readJSONReports :: FilePath -> IO (Either String ReportFileContents)
- writeJSONReports :: FilePath -> [Report] -> IO ()
The header identifies a criterion data file. This contains version information; there is no expectation of cross-version compatibility.
The current version of criterion, encoded into a string that is used in files.
Read all records from the given
Read all records from the given file.
On disk we store (name,version,reports), where
version is the version of Criterion used to generate the file.
Alternative file IO with JSON instances. Read a list of reports from a .json file produced by criterion.
If the version does not match exactly, this issues a warning.