<commit_before>{-# LANGUAGE DataKinds #-}
module Main where

import Criterion.Main
import SOPBench.Type
import SOPBench.Roundtrip

main :: IO ()
main =
  defaultMainWith defaultConfig
    [ bench "Roundtrip / S2 / GHCGeneric"     $ nf roundtrip (s2 :: S2 'GHCGeneric)
    , bench "Roundtrip / S2 / SOPGGP"         $ nf roundtrip (s2 :: S2 'SOPGGP    )
    , bench "Roundtrip / S2 / SOPTH"          $ nf roundtrip (s2 :: S2 'SOPTH     )
    , bench "Roundtrip / S20 / GHCGeneric"    $ nf roundtrip (s20 :: S20 'GHCGeneric)
    , bench "Roundtrip / S20 / SOPGGP"        $ nf roundtrip (s20 :: S20 'SOPGGP    )
    , bench "Roundtrip / S20 / SOPTH"         $ nf roundtrip (s20 :: S20 'SOPTH     )
    , bench "Roundtrip / PB2 / GHCGeneric"    $ nf roundtrip (pb2 :: PB2 'GHCGeneric)
    , bench "Roundtrip / PB2 / SOPGGP"        $ nf roundtrip (pb2 :: PB2 'SOPGGP    )
    , bench "Roundtrip / PB2 / SOPTH"         $ nf roundtrip (pb2 :: PB2 'SOPTH     )
    , bench "Eq / S2 / GHCDeriving"           $ nf ((==) s2) (s2 :: S2 'GHCDeriving)
    , bench "Eq / S2 / SOPGGP"                $ nf ((==) s2) (s2 :: S2 'SOPGGP     )
    , bench "Eq / S2 / SOPTH"                 $ nf ((==) s2) (s2 :: S2 'SOPTH      )
    , bench "Eq / S20 / GHCDeriving"          $ nf ((==) s20) (s20 :: S20 'GHCDeriving)
    , bench "Eq / S20 / SOPGGP"               $ nf ((==) s20) (s20 :: S20 'SOPGGP     )
    , bench "Eq / S20 / SOPTH"                $ nf ((==) s20) (s20 :: S20 'SOPTH      )
    , bench "Eq / PB2 / GHCDeriving"          $ nf ((==) pb2) (pb2 :: PB2 'GHCDeriving)
    , bench "Eq / PB2 / SOPGGP"               $ nf ((==) pb2) (pb2 :: PB2 'SOPGGP     )
    , bench "Eq / PB2 / SOPTH"                $ nf ((==) pb2) (pb2 :: PB2 'SOPTH      )
    , bench "Eq / Tree / GHCDeriving"         $ nf ((==) tree) (tree :: Tree 'GHCDeriving)
    , bench "Eq / Tree / SOPGGP"              $ nf ((==) tree) (tree :: Tree 'SOPGGP     )
    , bench "Eq / Tree / SOPTH"               $ nf ((==) tree) (tree :: Tree 'SOPTH      )
    , bench "Eq / Tree large / GHCDeriving"   $ nf ((==) tree_large) (tree_large :: Tree 'GHCDeriving)
    , bench "Eq / Tree large / SOPGGP"        $ nf ((==) tree_large) (tree_large :: Tree 'SOPGGP     )
    , bench "Eq / Tree large / SOPTH"         $ nf ((==) tree_large) (tree_large :: Tree 'SOPTH      )
    , bench "Show / S2 / GHCDeriving"         $ nf show (s2 :: S2 'GHCDeriving)
    , bench "Show / S2 / SOPGGP"              $ nf show (s2 :: S2 'SOPGGP     )
    , bench "Show / S2 / SOPTH"               $ nf show (s2 :: S2 'SOPTH      )
    , bench "Show / S20 / GHCDeriving"        $ nf show (s20 :: S20 'GHCDeriving)
    , bench "Show / S20 / SOPGGP"             $ nf show (s20 :: S20 'SOPGGP     )
    , bench "Show / S20 / SOPTH"              $ nf show (s20 :: S20 'SOPTH      )
    , bench "Show / PB2 / GHCDeriving"        $ nf show (pb2 :: PB2 'GHCDeriving)
    , bench "Show / PB2 / SOPGGP"             $ nf show (pb2 :: PB2 'SOPGGP     )
    , bench "Show / PB2 / SOPTH"              $ nf show (pb2 :: PB2 'SOPTH      )
    , bench "Show / Tree / GHCDeriving"       $ nf show (tree :: Tree 'GHCDeriving)
    , bench "Show / Tree / SOPGGP"            $ nf show (tree :: Tree 'SOPGGP     )
    , bench "Show / Tree / SOPTH"             $ nf show (tree :: Tree 'SOPTH      )
    , bench "Show / Tree large / GHCDeriving" $ nf show (tree_large :: Tree 'GHCDeriving)
    , bench "Show / Tree large / SOPGGP"      $ nf show (tree_large :: Tree 'SOPGGP     )
    , bench "Show / Tree large / SOPTH"       $ nf show (tree_large :: Tree 'SOPTH      )
    ]
<commit_msg>Benchmark grouping.<commit_after>{-# LANGUAGE DataKinds #-}
module Main where

import Criterion.Main
import SOPBench.Type
import SOPBench.Roundtrip

main :: IO ()
main =
  defaultMainWith defaultConfig
    [ bgroup "Roundtrip"
      [ bench "S2 / GHCGeneric"     $ nf roundtrip (s2 :: S2 'GHCGeneric)
      , bench "S2 / SOPGGP"         $ nf roundtrip (s2 :: S2 'SOPGGP    )
      , bench "S2 / SOPTH"          $ nf roundtrip (s2 :: S2 'SOPTH     )
      , bench "S20 / GHCGeneric"    $ nf roundtrip (s20 :: S20 'GHCGeneric)
      , bench "S20 / SOPGGP"        $ nf roundtrip (s20 :: S20 'SOPGGP    )
      , bench "S20 / SOPTH"         $ nf roundtrip (s20 :: S20 'SOPTH     )
      , bench "PB2 / GHCGeneric"    $ nf roundtrip (pb2 :: PB2 'GHCGeneric)
      , bench "PB2 / SOPGGP"        $ nf roundtrip (pb2 :: PB2 'SOPGGP    )
      , bench "PB2 / SOPTH"         $ nf roundtrip (pb2 :: PB2 'SOPTH     )
      ]
    , bgroup "Eq"
      [ bench "S2 / GHCDeriving"           $ nf ((==) s2) (s2 :: S2 'GHCDeriving)
      , bench "S2 / SOPGGP"                $ nf ((==) s2) (s2 :: S2 'SOPGGP     )
      , bench "S2 / SOPTH"                 $ nf ((==) s2) (s2 :: S2 'SOPTH      )
      , bench "S20 / GHCDeriving"          $ nf ((==) s20) (s20 :: S20 'GHCDeriving)
      , bench "S20 / SOPGGP"               $ nf ((==) s20) (s20 :: S20 'SOPGGP     )
      , bench "S20 / SOPTH"                $ nf ((==) s20) (s20 :: S20 'SOPTH      )
      , bench "PB2 / GHCDeriving"          $ nf ((==) pb2) (pb2 :: PB2 'GHCDeriving)
      , bench "PB2 / SOPGGP"               $ nf ((==) pb2) (pb2 :: PB2 'SOPGGP     )
      , bench "PB2 / SOPTH"                $ nf ((==) pb2) (pb2 :: PB2 'SOPTH      )
      , bench "Tree / GHCDeriving"         $ nf ((==) tree) (tree :: Tree 'GHCDeriving)
      , bench "Tree / SOPGGP"              $ nf ((==) tree) (tree :: Tree 'SOPGGP     )
      , bench "Tree / SOPTH"               $ nf ((==) tree) (tree :: Tree 'SOPTH      )
      , bench "Tree large / GHCDeriving"   $ nf ((==) tree_large) (tree_large :: Tree 'GHCDeriving)
      , bench "Tree large / SOPGGP"        $ nf ((==) tree_large) (tree_large :: Tree 'SOPGGP     )
      , bench "Tree large / SOPTH"         $ nf ((==) tree_large) (tree_large :: Tree 'SOPTH      )
      ]
    , bgroup "Show"
      [ bench "S2 / GHCDeriving"         $ nf show (s2 :: S2 'GHCDeriving)
      , bench "S2 / SOPGGP"              $ nf show (s2 :: S2 'SOPGGP     )
      , bench "S2 / SOPTH"               $ nf show (s2 :: S2 'SOPTH      )
      , bench "S20 / GHCDeriving"        $ nf show (s20 :: S20 'GHCDeriving)
      , bench "S20 / SOPGGP"             $ nf show (s20 :: S20 'SOPGGP     )
      , bench "S20 / SOPTH"              $ nf show (s20 :: S20 'SOPTH      )
      , bench "PB2 / GHCDeriving"        $ nf show (pb2 :: PB2 'GHCDeriving)
      , bench "PB2 / SOPGGP"             $ nf show (pb2 :: PB2 'SOPGGP     )
      , bench "PB2 / SOPTH"              $ nf show (pb2 :: PB2 'SOPTH      )
      , bench "Tree / GHCDeriving"       $ nf show (tree :: Tree 'GHCDeriving)
      , bench "Tree / SOPGGP"            $ nf show (tree :: Tree 'SOPGGP     )
      , bench "Tree / SOPTH"             $ nf show (tree :: Tree 'SOPTH      )
      , bench "Tree large / GHCDeriving" $ nf show (tree_large :: Tree 'GHCDeriving)
      , bench "Tree large / SOPGGP"      $ nf show (tree_large :: Tree 'SOPGGP     )
      , bench "Tree large / SOPTH"       $ nf show (tree_large :: Tree 'SOPTH      )
      ]
    ]

{'fraction_non_alphanumeric': 0.14842090355473728, 'fraction_numerical': 0.033989519898031444, 'mean_word_length': 1.633109619686801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '219711', 'n_tokens_mistral': 2883, 'n_tokens_neox': 2724, 'n_words': 716}