docs: add development.md
This commit is contained in:
parent
20a46b132e
commit
6b2d57f4ae
1 changed files with 41 additions and 0 deletions
41
development.md
Normal file
41
development.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
## Format, test, lint
|
||||
|
||||
```shell
|
||||
cargo fmt -- --check
|
||||
cargo test --all-features
|
||||
cargo clippy --allow-dirty --allow-staged
|
||||
```
|
||||
|
||||
## Update snapshot testing
|
||||
|
||||
```shell
|
||||
cargo install cargo-insta
|
||||
cargo insta test --all-features
|
||||
cargo insta review
|
||||
```
|
||||
|
||||
## Fuzz testing
|
||||
|
||||
```shell
|
||||
cargo install cargo-fuzz
|
||||
rustup default nightly
|
||||
cargo fuzz run fuzz_target_1
|
||||
```
|
||||
|
||||
## Benchmark
|
||||
|
||||
```shell
|
||||
curl -q https://orgmode.org/worg/doc.org --output ./benches/doc.org
|
||||
curl -q https://orgmode.org/worg/org-faq.org --output ./benches/org-faq.org
|
||||
curl -q https://orgmode.org/worg/org-syntax.org --output ./benches/org-syntax.org
|
||||
|
||||
cargo bench --bench parse
|
||||
```
|
||||
|
||||
## Benchmark w/ flamegraph
|
||||
|
||||
```shell
|
||||
cargo install flamegraph
|
||||
cargo flamegraph --bench parse -o baseline.svg -- --bench
|
||||
# then open baseline.svg with your browser
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue