CSV would be better than JSON

This commit is contained in:
Seungheon Oh 2022-05-24 16:55:48 -05:00
parent ad957d6b02
commit a74a98c206
No known key found for this signature in database
GPG key ID: 9B0E12D357369B66
4 changed files with 41 additions and 22 deletions

View file

@ -1,7 +1,8 @@
module Main (main) where
import Bench (specificationTreeToBenchmarks)
import Data.Aeson.Text (encodeToLazyText)
import Data.Csv (encodeDefaultOrderedByName)
import Data.Text.Lazy.Encoding (decodeUtf8)
import Data.Text.Lazy.IO as I
import Spec.AuthorityToken qualified as AuthorityToken
import Spec.Effect.GovernorMutation qualified as GovernorMutation
@ -17,8 +18,8 @@ import Prelude
main :: IO ()
main = do
I.writeFile "bench.json" $
encodeToLazyText $
I.writeFile "bench.csv" $
(decodeUtf8 . encodeDefaultOrderedByName) $
specificationTreeToBenchmarks $
group
"Benchmark"