Permalink
Browse files

Sort results

  • Loading branch information...
1 parent 9ae0f55 commit a7cf12c7d1a8a2f932a0ee43e20cefc85fbaafc5 @jaspervdj committed Jun 9, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Criterion/ToHtml/Html.hs
View
4 src/Criterion/ToHtml/Html.hs
@@ -5,7 +5,9 @@ module Criterion.ToHtml.Html
( table
) where
+import Data.List (sortBy)
import Data.Monoid (mappend)
+import Data.Ord (comparing)
import Text.Printf (printf)
import Text.Blaze (Html, toHtml, toValue, preEscapedString, (!))
@@ -22,7 +24,7 @@ table results = H.docTypeHtml $ do
H.tr $ do
H.th "Name"
H.th "Mean"
- mapM_ row $ normalizeMeans results
+ mapM_ row $ normalizeMeans $ sortBy (comparing resultMean) results
row :: (Result, Double) -> Html
row (Result name _, n) = H.tr $ do

0 comments on commit a7cf12c

Please sign in to comment.