-- | Create a large HTML table and dump it to a handle -- -- Tested in this benchmark: -- -- * Creating a large HTML document using a builder -- -- * Writing to a handle -- {-# LANGUAGE OverloadedStrings #-} module Benchmarks.Programs.BigTable ( benchmark ) where import Criterion (Benchmark, bench, whnfIO) import Data.Monoid (mappend, mconcat) import Data.Text.Lazy.Builder (Builder, fromText, toLazyText) import Data.Text.Lazy.IO (hPutStr) import System.IO (Handle) import qualified Data.Text as T benchmark :: Handle -> IO Benchmark benchmark sink = return $ bench "BigTable" $ whnfIO $ do hPutStr sink "Content-Type: text/html\n\n