lean4-htt/tests/bench/inundation
David Thrane Christiansen 966fa800f8
chore: remove the coercion from String to Name (#3589)
This coercion caused difficult-to-diagnose bugs sometimes. Because there
are some situations where converting a string to a name should be done
by parsing the string, and others where it should not, an explicit
choice seems better here.

---------

Co-authored-by: Mac Malone <tydeu@hatpress.net>
2024-03-21 23:46:03 +00:00
..
.gitignore test: lake: add env & dep cfg benchmarks + cleanup 2023-09-22 20:31:48 -04:00
lakefile.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
README.md test: lake: add env & dep cfg benchmarks + cleanup 2023-09-22 20:31:48 -04:00

Stress Test for Lake

This folder generates a deeply nested import tree of Lean modules that can then be used as a stress test of large Lake builds (e.g., Mathlib). The modules lack any code. This removes variations in Lean elaboration time as a confounding factor, but also means this test cannot be used to profile features that depend on code size (e.g., OLean hashing or a module system).

It also generates a test workspace with many requires to benchmark the cost of importing a multi-package configuration.

Usage

This folder is tested as part of Lean's speed center benchmarks, but it can also be run manually like so:

lake run mkTree
lake -d=test/tree update
time lake -d=test/tree script run nop
lake run mkBuild
time lake build

These commands generate the mock packages and source files and then time a configuration import and a build.

Variations

The source generation configuration is flexible:

lake run -Ktest=Test mkBuild 40 40

The test option is which subdirectory of the Inundation source directory to output library files. The first number is the maximum dependency depth, and the second number is the number of dependencies for each file.

lake run mkTree 10

The number is how many dependency configurations to generate.

The settings in each example are the default values.

Credits

This test is a fork of Gabriel Ebner's GitHub repository. Thank him for the initial idea!