Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for hastache 0.5.0 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions lib/Network/HTTP/LoadTest/Report.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,19 @@ templateDir = unsafePerformIO $ getDataFileName "templates"

writeReport :: (Data a) => FilePath -> Handle -> Double -> Analysis a -> IO ()
writeReport template h elapsed a@Analysis{..} = do
let context "include" = MuLambdaM $
let context "include" = return . MuLambdaM $
R.includeFile [templateDir, R.templateDir]
context "elapsed" = MuVariable elapsed
context "latKdeTimes" = R.vector "x" latKdeTimes
context "latKdePDF" = R.vector "x" latKdePDF
context "latKde" = R.vector2 "time" "pdf" latKdeTimes latKdePDF
context "latValues" = MuList . map mkGenericContext . G.toList $ lats
context "thrTimes" = R.vector "x" thrTimes
context "thrValues" = R.vector "x" thrValues
context "concTimes" = R.vector "x" . U.fromList $ map fstS conc
context "concValues" = R.vector "x" . U.fromList $ map sndS conc
context "elapsed" = return $ MuVariable elapsed
context "latKdeTimes" = return $ R.vector "x" latKdeTimes
context "latKdePDF" = return $ R.vector "x" latKdePDF
context "latKde" = return $
R.vector2 "time" "pdf" latKdeTimes latKdePDF
context "latValues" = return . MuList
. map mkGenericContext . G.toList $ lats
context "thrTimes" = return $ R.vector "x" thrTimes
context "thrValues" = return $ R.vector "x" thrValues
context "concTimes" = return . R.vector "x" . U.fromList $ map fstS conc
context "concValues" = return . R.vector "x" . U.fromList $ map sndS conc
context n = mkGenericContext a n
(latKdeTimes,latKdePDF) = kde 128 . G.convert . G.map summElapsed $ latValues
lats = G.map (\s -> s { summStart = summStart s - t }) latValues
Expand Down
2 changes: 1 addition & 1 deletion pronk.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ library
filepath,
ghc-prim >= 0.2.0.0,
hashable >= 1.2.0.2,
hastache,
hastache >= 0.5.0,
http-conduit >= 1.7,
http-types,
lifted-base,
Expand Down