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

Add small phylo benchmark

parent 8e93c048
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,7 +4,6 @@ module Main where ...@@ -4,7 +4,6 @@ module Main where
import Control.DeepSeq import Control.DeepSeq
import Gargantext.Core.Types.Individu import Gargantext.Core.Types.Individu
import Gargantext.Core.Types.Phylo
import Gargantext.Core.Viz.Phylo import Gargantext.Core.Viz.Phylo
import Gargantext.Core.Viz.Phylo.API.Tools (readPhylo) import Gargantext.Core.Viz.Phylo.API.Tools (readPhylo)
import Gargantext.Core.Viz.Phylo.PhyloMaker (toPhylo) import Gargantext.Core.Viz.Phylo.PhyloMaker (toPhylo)
...@@ -40,7 +39,8 @@ phyloConfig = PhyloConfig { ...@@ -40,7 +39,8 @@ phyloConfig = PhyloConfig {
main :: IO () main :: IO ()
main = do 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 defaultMain
[ bgroup "Benchmarks" [ bgroup "Benchmarks"
[ bgroup "User creation" [ [ bgroup "User creation" [
...@@ -49,7 +49,7 @@ main = do ...@@ -49,7 +49,7 @@ main = do
whnfIO (toUserHash $ NewUser "alfredo" "alfredo@well-typed.com" (GargPassword "rabbit")) whnfIO (toUserHash $ NewUser "alfredo" "alfredo@well-typed.com" (GargPassword "rabbit"))
] ]
, bgroup "Phylo" [ , bgroup "Phylo" [
bench "toPhylo" $ nf toPhylo issue290Phylo bench "toPhylo (small)" $ nf toPhylo issue290PhyloSmall
] ]
] ]
] ]
...@@ -18,6 +18,7 @@ license-file: LICENSE ...@@ -18,6 +18,7 @@ license-file: LICENSE
build-type: Simple build-type: Simple
data-files: data-files:
bench-data/phylo/issue-290.json bench-data/phylo/issue-290.json
bench-data/phylo/issue-290-small.json
devops/postgres/extensions.sql devops/postgres/extensions.sql
devops/postgres/schema.sql devops/postgres/schema.sql
ekg-assets/index.html ekg-assets/index.html
...@@ -1156,12 +1157,14 @@ benchmark garg-bench ...@@ -1156,12 +1157,14 @@ benchmark garg-bench
main-is: Main.hs main-is: Main.hs
hs-source-dirs: bench hs-source-dirs: bench
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
other-modules:
Paths_gargantext
build-depends: base build-depends: base
, bytestring , bytestring
, deepseq , deepseq
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, tasty-bench , tasty-bench
ghc-options: "-with-rtsopts=-A32m" ghc-options: "-with-rtsopts=-T -A32m"
if impl(ghc >= 8.6) if impl(ghc >= 8.6)
ghc-options: "-with-rtsopts=--nonmoving-gc" 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