-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
62 lines (45 loc) · 3.79 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[package]
name = "big-o-test"
version = "0.2.9"
edition = "2021"
description = "Enforces a maximum `space` and `time` Algorithm Complexity when testing"
keywords = ["algorithm", "analysis", "Big-O", "notation", "performance"]
categories = ["development-tools", "development-tools::profiling", "development-tools::testing"]
readme = "README.md"
authors = ["Luiz Silveira <zertyz@gmail.com>"]
homepage = "https://github.com/zertyz/big-o"
repository = "https://github.com/zertyz/big-o"
documentation = "https://docs.rs/big-o-test/"
license = "Unlicense"
[workspace]
[dependencies]
crossbeam = "0.8" # scoped threads
keen-retry = "0.4" # for automatic retries on flaky execution passes
[dev-dependencies] # dev dependencies should become normal dependencies when building docs for tests
ctor = "0.2" # initializer functions -- that run before main
serial_test = "2.0" # run tests serially
parking_lot = "0.12" # way faster than std mutex
spin_sleep = "1.1" # precise sleeping, avoiding busy loops on some tests
rand = "0.8" # used by some tests to avoid call cancellation optimizations when running in release mode
[features]
[package.metadata.docs.rs]
rustdoc-args = ["--document-private-items"] # enables full documentation (including test modules and test cases)
# DOCUMENTATION
# cargo doc --workspace --no-deps --document-private-items
# DEPENDENCIES (crates)
# cargo depgraph --all-features | dot -x -Tsvg -o dependencies.svg
# (install with cargo install cargo-depgraph)
# DEPENDENCIES (program)
# (install with cargo install cargo-modules)
# MODULE dependencies
# package="big-o"; layout="dot"; format="svg"; cargo modules generate graph --with-uses --package "${package}" --layout "$layout" | sed 's/label="uses"\|label="owns"/label=""/g' | sed 's|splines="line"|splines=true|g' | sed "s|${package}::||g" | sed 's|::|⸬|g' >modules.dot;
# for duplicate_to_remove in "`cat modules.dot | sort -r | sed '$!N; /\(.* \-> .*\) \[label=".*\n\1.*"owns" edge/P;D'`"; do grep -vF -- "${duplicate_to_remove}" modules.dot >_modules.dot; mv _modules.dot modules.dot; done;
# dot -x -T${format} -o modules.${format} modules.dot; rm modules.dot
# TYPES
# package="big-o"; layout="dot"; format="svg"; name="types"; cargo modules generate graph --with-uses --with-types --package "${package}" --layout "$layout" | sed 's/label="uses"\|label="owns"/label=""/g' | sed 's|splines="line"|splines=true|g' | sed "s|${package}::||g" | sed 's|::|⸬|g' >${name}.dot;
# for duplicate_to_remove in "`cat ${name}.dot | grep -E ' // "fn" node' | sed 's|^\s*\("[^"]*"\).*$|\1|'`" "`cat ${name}.dot | sort -r | sed '$!N; /\(.* \-> .*\) \[label=".*\n\1.*"owns" edge/P;D'`"; do if [ "$duplicate_to_remove" != "" ]; then grep -vF -- "${duplicate_to_remove}" ${name}.dot >_${name}.dot; mv _${name}.dot ${name}.dot; fi; done;
# dot -x -T${format} -o ${name}.${format} ${name}.dot; rm ${name}.dot
# FUNCTIONS -- doesn't include functions referenced in macros, sadly (update the ones above with knowledge from this)
# package="big-o"; layout="dot"; format="svg"; name="functions"; cargo modules generate graph --with-uses --with-types --package "${package}" --layout "$layout" | sed 's/label="uses"\|label="owns"/label=""/g' | sed 's|splines="line"|splines=true|g' | sed "s|${package}::||g" | sed 's|::|⸬|g' >${name}.dot;
# for duplicate_to_remove in "`cat ${name}.dot | grep -E ' // "const" node| // "enum" node| // "trait" node| // "struct" node' | sed 's|^\s*\("[^"]*"\).*$|\1|'`" "`cat ${name}.dot | sort -r | sed '$!N; /\(.* \-> .*\) \[label=".*\n\1.*"owns" edge/P;D'`"; do if [ "$duplicate_to_remove" != "" ]; then grep -vF -- "${duplicate_to_remove}" ${name}.dot >_${name}.dot; mv _${name}.dot ${name}.dot; fi; done;
# dot -x -T${format} -o ${name}.${format} ${name}.dot; rm ${name}.dot