-- Benchmarks for bio functionality

module Main where
import Test.QuickBench
import System.IO

import Bio.Util.TestBase

import Bio.Util.Test       as U
import Bio.Alignment.Test  as A
import Bio.Sequence.Test   as S
import Bio.Clustering.Test as C

all_tests :: [(String,[Test])]
all_tests = [ -- ("Alignment bench",   A.bench)
--             , 
              ("Sequence bench",    S.bench)
            ]

main = do
  hSetBuffering stdout NoBuffering
  time "Total for all tests" (mapM_ runBenches all_tests)

runBenches :: (String,[Test]) -> IO ()
runBenches (hd,ts) = do
  putStrLn ("\n --- "++hd++" ---\n")
  time (hd++" totals") (mapM_ runBench ts)

runBench (T name t) = do 
  putStr $ name ++ " " ++ replicate (28-length name) '.' ++ " "
  quickTime t

