Skip to content

Commit 415bbf6

Browse files
committed
fix conflicts
2 parents 1dc82ae + 2cbbf6e commit 415bbf6

File tree

184 files changed

+8447
-2768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+8447
-2768
lines changed

Cargo.lock

Lines changed: 96 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ pretty_assertions = "1.4.0"
7373
proptest = "1.3.1"
7474
pulldown-cmark = { version = "0.9.3", default-features = false }
7575
rand = "0.8.5"
76+
regex = "1.9.3"
77+
rusqlite = { version = "0.29.0", features = ["bundled"] }
7678
rustfix = "0.6.1"
7779
same-file = "1.0.6"
7880
security-framework = "2.9.2"
@@ -85,6 +87,7 @@ serde_json = "1.0.108"
8587
sha1 = "0.10.6"
8688
sha2 = "0.10.8"
8789
shell-escape = "0.1.5"
90+
supports-hyperlinks = "2.1.0"
8891
snapbox = { version = "0.4.14", features = ["diff", "path"] }
8992
syn = { version = "2.0.38", features = ["extra-traits", "full"] }
9093
tar = { version = "0.4.40", default-features = false }
@@ -127,9 +130,6 @@ anyhow.workspace = true
127130
base64.workspace = true
128131
bytesize.workspace = true
129132
cargo-credential.workspace = true
130-
cargo-credential-libsecret.workspace = true
131-
cargo-credential-macos-keychain.workspace = true
132-
cargo-credential-wincred.workspace = true
133133
cargo-platform.workspace = true
134134
cargo-util.workspace = true
135135
clap = { workspace = true, features = ["wrap_help"] }
@@ -164,6 +164,8 @@ pasetors.workspace = true
164164
pathdiff.workspace = true
165165
pulldown-cmark.workspace = true
166166
rand.workspace = true
167+
regex.workspace = true
168+
rusqlite.workspace = true
167169
rustfix.workspace = true
168170
semver.workspace = true
169171
serde = { workspace = true, features = ["derive"] }
@@ -173,6 +175,7 @@ serde_ignored.workspace = true
173175
serde_json = { workspace = true, features = ["raw_value"] }
174176
sha1.workspace = true
175177
shell-escape.workspace = true
178+
supports-hyperlinks.workspace = true
176179
syn.workspace = true
177180
tar.workspace = true
178181
tempfile.workspace = true
@@ -187,9 +190,18 @@ unicode-xid.workspace = true
187190
url.workspace = true
188191
walkdir.workspace = true
189192

193+
[target.'cfg(target_os = "linux")'.dependencies]
194+
cargo-credential-libsecret.workspace = true
195+
196+
[target.'cfg(target_os = "macos")'.dependencies]
197+
cargo-credential-macos-keychain.workspace = true
198+
190199
[target.'cfg(not(windows))'.dependencies]
191200
openssl = { workspace = true, optional = true }
192201

202+
[target.'cfg(windows)'.dependencies]
203+
cargo-credential-wincred.workspace = true
204+
193205
[target.'cfg(windows)'.dependencies.windows-sys]
194206
workspace = true
195207
features = [

benches/README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@ cd benches/benchsuite
99
cargo bench
1010
```
1111

12-
The tests involve downloading the index and benchmarking against some
12+
However, running all benchmarks would take many minutes, so in most cases it
13+
is recommended to just run the benchmarks relevant to whatever section of code
14+
you are working on.
15+
16+
## Benchmarks
17+
18+
There are several different kinds of benchmarks in the `benchsuite/benches` directory:
19+
20+
* `global_cache_tracker` — Benchmarks saving data to the global cache tracker
21+
database using samples of real-world data.
22+
* `resolve` — Benchmarks the resolver against simulations of real-world workspaces.
23+
* `workspace_initialization` — Benchmarks initialization of a workspace
24+
against simulations of real-world workspaces.
25+
26+
### Resolve benchmarks
27+
28+
The resolve benchmarks involve downloading the index and benchmarking against some
1329
real-world and artificial workspaces located in the [`workspaces`](workspaces)
1430
directory.
1531

@@ -21,15 +37,32 @@ faster. You can (and probably should) specify individual benchmarks to run to
2137
narrow it down to a more reasonable set, for example:
2238

2339
```sh
24-
cargo bench -- resolve_ws/rust
40+
cargo bench -p benchsuite --bench resolve -- resolve_ws/rust
2541
```
2642

2743
This will only download what's necessary for the rust-lang/rust workspace
2844
(which is about 330MB) and run the benchmarks against it (which should take
2945
about a minute). To get a list of all the benchmarks, run:
3046

3147
```sh
32-
cargo bench -- --list
48+
cargo bench -p benchsuite --bench resolve -- --list
49+
```
50+
51+
### Global cache tracker
52+
53+
The `global_cache_tracker` benchmark tests saving data to the global cache
54+
tracker database using samples of real-world data. This benchmark should run
55+
relatively quickly.
56+
57+
The real-world data is based on a capture of my personal development
58+
environment which has accumulated a large cache. So it is somewhat arbitrary,
59+
but hopefully representative of a challenging environment. Capturing of the
60+
data is done with the `capture-last-use` binary, which you can run if you need
61+
to rebuild the database. Just try to run on a system with a relatively full
62+
cache in your cargo home directory.
63+
64+
```sh
65+
cargo bench -p benchsuite --bench global_cache_tracker
3366
```
3467

3568
## Viewing reports

benches/benchsuite/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ publish = false
1111

1212
[dependencies]
1313
cargo.workspace = true
14+
cargo-util.workspace = true
1415
criterion.workspace = true
1516
flate2.workspace = true
17+
rand.workspace = true
1618
tar.workspace = true
1719
url.workspace = true
1820

@@ -26,3 +28,7 @@ harness = false
2628
[[bench]]
2729
name = "workspace_initialization"
2830
harness = false
31+
32+
[[bench]]
33+
name = "global_cache_tracker"
34+
harness = false

0 commit comments

Comments
 (0)