Commit 10ebc437 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Add small phylo benchmark

parent 8e93c048
This diff is collapsed.
......@@ -4,7 +4,6 @@ module Main where
import Control.DeepSeq
import Gargantext.Core.Types.Individu
import Gargantext.Core.Types.Phylo
import Gargantext.Core.Viz.Phylo
import Gargantext.Core.Viz.Phylo.API.Tools (readPhylo)
import Gargantext.Core.Viz.Phylo.PhyloMaker (toPhylo)
......@@ -40,7 +39,8 @@ phyloConfig = PhyloConfig {
main :: IO ()
main = do
issue290Phylo <- force . setConfig phyloConfig <$> (readPhylo =<< getDataFileName "bench-data/phylo/issue-290.json")
_issue290Phylo <- force . setConfig phyloConfig <$> (readPhylo =<< getDataFileName "bench-data/phylo/issue-290.json")
issue290PhyloSmall <- force . setConfig phyloConfig <$> (readPhylo =<< getDataFileName "bench-data/phylo/issue-290-small.json")
defaultMain
[ bgroup "Benchmarks"
[ bgroup "User creation" [
......@@ -49,7 +49,7 @@ main = do
whnfIO (toUserHash $ NewUser "alfredo" "alfredo@well-typed.com" (GargPassword "rabbit"))
]
, bgroup "Phylo" [
bench "toPhylo" $ nf toPhylo issue290Phylo
bench "toPhylo (small)" $ nf toPhylo issue290PhyloSmall
]
]
]
......@@ -18,6 +18,7 @@ license-file: LICENSE
build-type: Simple
data-files:
bench-data/phylo/issue-290.json
bench-data/phylo/issue-290-small.json
devops/postgres/extensions.sql
devops/postgres/schema.sql
ekg-assets/index.html
......@@ -1156,12 +1157,14 @@ benchmark garg-bench
main-is: Main.hs
hs-source-dirs: bench
type: exitcode-stdio-1.0
other-modules:
Paths_gargantext
build-depends: base
, bytestring
, deepseq
, gargantext
, gargantext-prelude
, tasty-bench
ghc-options: "-with-rtsopts=-A32m"
ghc-options: "-with-rtsopts=-T -A32m"
if impl(ghc >= 8.6)
ghc-options: "-with-rtsopts=--nonmoving-gc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment