From b7e7852ffb414443e33e65d4fa976900aaf0a39f Mon Sep 17 00:00:00 2001 From: Roly Perera Date: Tue, 3 Oct 2023 15:25:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=A9=20[rename]:=20e=20->=20s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/Many.purs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/Many.purs b/test/Many.purs index 82d7c2d88..50a34669c 100644 --- a/test/Many.purs +++ b/test/Many.purs @@ -13,36 +13,36 @@ import Util (type (×), (×)) import Val (ProgCxt(..), (<+>)) many :: Array TestSpec -> Int -> Array (String × Aff BenchRow) -many specs iter = zip (specs <#> _.file) (specs <#> one) +many specs n = zip (specs <#> _.file) (specs <#> one) where one { file, fwd_expect } = do gconfig <- openDefaultImports - e <- open (File file) - rows <- replicateM iter $ - testWithSetup file e gconfig { δv: identity, fwd_expect, bwd_expect: mempty } + s <- open (File file) + rows <- replicateM n $ + testWithSetup file s gconfig { δv: identity, fwd_expect, bwd_expect: mempty } pure $ averageRows rows bwdMany :: Array TestBwdSpec -> Int -> Array (String × Aff BenchRow) -bwdMany specs iter = zip (specs <#> _.file) (specs <#> bwdOne) +bwdMany specs n = zip (specs <#> _.file) (specs <#> bwdOne) where folder = File "slicing/" bwdOne { file, file_expect, δv, fwd_expect } = do gconfig <- openDefaultImports bwd_expect <- loadFile (Folder "fluid/example") (folder <> File file_expect) - e <- open (folder <> File file) - rows <- replicateM iter $ - testWithSetup file e gconfig { δv, fwd_expect, bwd_expect } + s <- open (folder <> File file) + rows <- replicateM n $ + testWithSetup file s gconfig { δv, fwd_expect, bwd_expect } pure $ averageRows rows withDatasetMany :: Array TestWithDatasetSpec -> Int -> Array (String × Aff BenchRow) -withDatasetMany specs iter = zip (specs <#> _.file) (specs <#> withDatasetOne) +withDatasetMany specs n = zip (specs <#> _.file) (specs <#> withDatasetOne) where withDatasetOne { dataset, file } = do -- TODO: make progCxt consistent with addition of xv gconfig@{ progCxt: ProgCxt r@{ γ } } × xv <- openDefaultImports >>= openDatasetAs (File dataset) "data" - e <- open (File file) - rows <- replicateM iter $ - testWithSetup file e gconfig { progCxt = ProgCxt r { γ = γ <+> xv } } + s <- open (File file) + rows <- replicateM n $ + testWithSetup file s gconfig { progCxt = ProgCxt r { γ = γ <+> xv } } { δv: identity, fwd_expect: mempty, bwd_expect: mempty } pure $ averageRows rows