mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Add notes on profiling
This commit is contained in:
@@ -61,11 +61,31 @@ stack bench --benchmark-arguments "run lpgf Foods.lpgf testsuite/lpgf/foods/Food
|
|||||||
stack build --test --bench --no-run-tests --no-run-benchmarks &&
|
stack build --test --bench --no-run-tests --no-run-benchmarks &&
|
||||||
stack bench --benchmark-arguments "compile pgf testsuite/lpgf/phrasebook/Phrasebook*.gf +RTS -T -RTS" &&
|
stack bench --benchmark-arguments "compile pgf testsuite/lpgf/phrasebook/Phrasebook*.gf +RTS -T -RTS" &&
|
||||||
stack bench --benchmark-arguments "compile lpgf testsuite/lpgf/phrasebook/Phrasebook*.gf +RTS -T -RTS" &&
|
stack bench --benchmark-arguments "compile lpgf testsuite/lpgf/phrasebook/Phrasebook*.gf +RTS -T -RTS" &&
|
||||||
stack bench --benchmark-arguments "run pgf Foods.pgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS" &&
|
stack bench --benchmark-arguments "run pgf Phrasebook.pgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS" &&
|
||||||
stack bench --benchmark-arguments "run pgf2 Foods.pgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS" &&
|
stack bench --benchmark-arguments "run pgf2 Phrasebook.pgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS" &&
|
||||||
stack bench --benchmark-arguments "run lpgf Foods.lpgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS"
|
stack bench --benchmark-arguments "run lpgf Phrasebook.lpgf testsuite/lpgf/phrasebook/Phrasebook-10000.trees +RTS -T -RTS"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Profiling
|
||||||
|
|
||||||
|
```
|
||||||
|
stack bench --work-dir .stack-work-profile --profile --benchmark-arguments "compile lpgf testsuite/lpgf/phrasebook/PhrasebookFre.gf +RTS -T -p -h -RTS"
|
||||||
|
```
|
||||||
|
|
||||||
|
Produced files:
|
||||||
|
- `lpgf-bench.prof` - total time and memory allocation (`-p`)
|
||||||
|
- `lpgf-bench.hp` - heap profile (`-h`)
|
||||||
|
|
||||||
|
```
|
||||||
|
stack exec -- hp2ps -c lpgf-bench.hp && open lpgf-bench.ps
|
||||||
|
```
|
||||||
|
|
||||||
|
**Resources**
|
||||||
|
|
||||||
|
- https://downloads.haskell.org/ghc/8.6.5/docs/html/users_guide/profiling.html
|
||||||
|
- http://book.realworldhaskell.org/read/profiling-and-optimization.html
|
||||||
|
- https://wiki.haskell.org/Performance
|
||||||
|
|
||||||
# Notes on compilation
|
# Notes on compilation
|
||||||
|
|
||||||
## 1 (see unittests/Params4)
|
## 1 (see unittests/Params4)
|
||||||
|
|||||||
Reference in New Issue
Block a user