Skip to content

Commit

Permalink
benchmark-web: shorten benchmark names
Browse files Browse the repository at this point in the history
  • Loading branch information
runeksvendsen committed Oct 28, 2024
1 parent 888a921 commit 7d838a1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions benchmark/web/BenchmarkWeb.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@ runTests
:: ((StreamIOHtml -> StreamIOHtml) -> Maybe Server.Api.NoGraph -> FunGraph.Test.QueryTest -> IO BSL.ByteString)
-> IO ()
runTests runQuery = do
defaultMain
[ bgroup "Web server" $
defaultMain $
allTestCasesNoTimeout <&> \testCase ->
bgroup (FunGraph.Test.queryTest_name testCase) $
[ ("(all results)", id)
, ("(first result)", untilFirstResult) -- WIP: verify this actually works
] <&> \(postFix, modifyStream) ->
bgroup ("search " ++ postFix)
[ ("all results", id)
, ("first result", untilFirstResult) -- WIP: verify this actually works
] <&> \(name, modifyStream) ->
bgroup name
[ bench "with graph" $
benchHttpRequest modifyStream Nothing testCase
, bench "without graph" $
, bench "no graph" $
benchHttpRequest modifyStream (Just Server.Api.NoGraph) testCase
]
]
where
-- Currently, the test cases with an empty expected result are tests that are expected to time out.
-- There's no reason to benchmark this.
Expand Down

0 comments on commit 7d838a1

Please sign in to comment.