From 6f2bcebe7abd0a887eb9756d2dc3a7fa49add1e8 Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Fri, 31 Jan 2025 13:20:38 +0000 Subject: [PATCH] update readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 827d40d549..2198b092c8 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ make dev-init ./quicktest.sh -m "not fuzzing" ``` +## Testing (with hevm) + +Install hevm by downloading it from the releases page (https://github.com/ethereum/hevm/releases/latest) and making sure it is in your PATH. hevm tests can be enabled with `--hevm` flag, and hevm tests can be selected with the `-m hevm` marker. For instance, `./quicktest.sh -m "hevm" --hevm`. + ## Developing (working on the compiler) A useful script to have in your PATH is something like the following: @@ -67,7 +71,9 @@ To run a python performance profile (to find compiler perf hotspots): PYTHONPATH=. python -m cProfile -s tottime vyper/cli/vyper_compile.py "$@" ``` -To get a call graph from a python profile, https://stackoverflow.com/a/23164271/ is helpful. +To get a call graph from a python profile, pip install `gprof2dot` and `xdot`, and run it like `gprof2dot -f pstats stats | xdot -`. (See https://stackoverflow.com/a/23164271/). + +The utility timer functions `timeit`, `profileit` and `cumtimeit` are available in `vyper/utils.py`. # Contributing