Skip to content

Commit 712661f

Browse files
authored
Merge branch 'master' into categorize-perf-runs
2 parents 85364da + 54e3858 commit 712661f

File tree

20 files changed

+604
-789
lines changed

20 files changed

+604
-789
lines changed

Cargo.lock

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

collector/Cargo.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@ edition = '2018'
66

77
[dependencies]
88
clap = "2.25"
9-
env_logger = "0.7"
9+
env_logger = "0.8"
1010
anyhow = "1"
1111
thiserror = "1"
1212
log = "0.4"
1313
serde = { version = "1", features = ["derive"] }
1414
serde_json = "1"
1515
tempfile = "3"
1616
libc = "0.2"
17-
chrono = "0.4"
17+
chrono = { version = "0.4", features = ["serde"] }
1818
lazy_static = "1"
19-
semver = "0.9"
20-
reqwest = { version = "0.10", features = ["json"] }
19+
semver = "1.0"
20+
reqwest = { version = "0.11", features = ["json"] }
2121
xz2 = "0.1.3"
2222
tar = "0.4"
23-
tokio = { version = "0.2", features = ["rt-core"] }
24-
rustc-artifacts = "0.2"
23+
tokio = { version = "1.6", features = ["rt"] }
2524
database = { path = "../database" }
2625
intern = { path = "../intern" }
2726
futures = "0.3.5"
2827
num_cpus = "1.13"
2928
jobserver = "0.1.21"
30-
crossbeam-utils = "0.7"
29+
crossbeam-utils = "0.8"
3130
snap = "1"
3231
filetime = "0.2.14"
3332
walkdir = "2"

collector/src/lib.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,29 @@ pub fn command_output(cmd: &mut Command) -> anyhow::Result<process::Output> {
224224

225225
Ok(output)
226226
}
227+
228+
#[derive(Debug, Clone, Deserialize)]
229+
pub struct MasterCommit {
230+
pub sha: String,
231+
pub parent_sha: String,
232+
/// This is the pull request which this commit merged in.
233+
#[serde(default)]
234+
pub pr: Option<u32>,
235+
pub time: chrono::DateTime<chrono::Utc>,
236+
}
237+
238+
/// This provides the master-branch Rust commits which should have accompanying
239+
/// bors artifacts available.
240+
///
241+
/// The first commit returned (at index 0) is the most recent, the last is the
242+
/// oldest.
243+
///
244+
/// Specifically, this is the last 168 days of bors commits.
245+
///
246+
/// Note that this does not contain try commits today, so it should not be used
247+
/// to validate hashes or expand them generally speaking. This may also change
248+
/// in the future.
249+
pub async fn master_commits() -> Result<Vec<MasterCommit>, Box<dyn std::error::Error + Sync + Send>> {
250+
let response = reqwest::get("https://triage.rust-lang.org/bors-commit-list").await?;
251+
Ok(response.json().await?)
252+
}

collector/src/main.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,12 @@ fn main_result() -> anyhow::Result<i32> {
546546

547547
let benchmark_dir = PathBuf::from("collector/benchmarks");
548548

549-
let mut builder = tokio::runtime::Builder::new();
549+
let mut builder = tokio::runtime::Builder::new_multi_thread();
550550
// We want to minimize noise from the runtime
551551
builder
552-
.core_threads(1)
553-
.max_threads(1)
554-
.enable_io()
555-
.basic_scheduler();
552+
.worker_threads(1)
553+
.max_blocking_threads(1)
554+
.enable_io();
556555
let mut rt = builder.build().expect("built runtime");
557556

558557
let default_db = "results.db";
@@ -810,9 +809,9 @@ fn main_result() -> anyhow::Result<i32> {
810809
}
811810

812811
pub fn get_commit_or_fake_it(sha: &str) -> anyhow::Result<Commit> {
813-
let mut rt = tokio::runtime::Runtime::new().unwrap();
812+
let rt = tokio::runtime::Runtime::new().unwrap();
814813
Ok(rt
815-
.block_on(rustc_artifacts::master_commits())
814+
.block_on(collector::master_commits())
816815
.map_err(|e| anyhow::anyhow!("{:?}", e))
817816
.context("getting master commit list")?
818817
.into_iter()

database/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
hashbrown = { version = "0.7", features = ["serde"] }
10+
hashbrown = { version = "0.11", features = ["serde"] }
1111
serde = { version = "1", features = ["derive"] }
1212
serde_json = "1"
13-
rusqlite = { version = "0.23", features = ["bundled"] }
14-
tokio-postgres = { version = "0.5.4", features = ["with-serde_json-1", "with-chrono-0_4"] }
13+
rusqlite = { version = "0.25", features = ["bundled"] }
14+
tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-chrono-0_4", "runtime"] }
1515
anyhow = "1"
1616
async-trait = "0.1"
17-
tokio = { version = "0.2.21", features = ["sync", "macros"] }
17+
tokio = { version = "1.6", features = ["sync", "macros"] }
1818
snap = "1"
1919
intern = { path = "../intern" }
2020
chrono = "0.4"
21-
reqwest = { version = "0.10.5", features = ["blocking"] }
22-
postgres-native-tls = "0.3"
21+
reqwest = { version = "0.11", features = ["blocking"] }
22+
postgres-native-tls = "0.5"
2323
native-tls = "0.2"
2424
lazy_static = "1"
25-
env_logger = "0.7"
25+
env_logger = "0.8"
2626
futures = "0.3.5"
2727
log = "0.4"

database/src/bin/export-to-sqlite.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ async fn copy<R: Table>(
310310
R::trailer()
311311
)
312312
.as_str(),
313-
vec![],
313+
Vec::<u32>::new(),
314314
)
315315
.await
316316
.unwrap();

database/src/bin/ingest-json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ impl Ingesting for Sqlite<'_> {
289289
let mut exact = series.chunks_exact(9);
290290
for series in exact.by_ref() {
291291
cached
292-
.execute(series.iter().flat_map(|v| {
292+
.execute(rusqlite::params_from_iter(series.iter().flat_map(|v| {
293293
vec![
294294
ToSqlOutput::Borrowed(ValueRef::Text(v.krate.as_bytes())),
295295
ToSqlOutput::Borrowed(ValueRef::Text(v.profile.as_bytes())),
296296
ToSqlOutput::Borrowed(ValueRef::Text(v.cache.as_bytes())),
297297
ToSqlOutput::Borrowed(ValueRef::Text(v.statistic.as_bytes())),
298298
]
299-
}))
299+
})))
300300
.unwrap();
301301
}
302302
for v in exact.remainder() {
@@ -357,14 +357,14 @@ impl Ingesting for Sqlite<'_> {
357357
let mut exact = series.chunks_exact(21);
358358
for series in exact.by_ref() {
359359
cached
360-
.execute(series.iter().flat_map(|v| {
360+
.execute(rusqlite::params_from_iter(series.iter().flat_map(|v| {
361361
vec![
362362
ToSqlOutput::Borrowed(ValueRef::Text(v.krate.as_bytes())),
363363
ToSqlOutput::Borrowed(ValueRef::Text(v.profile.as_bytes())),
364364
ToSqlOutput::Borrowed(ValueRef::Text(v.cache.as_bytes())),
365365
ToSqlOutput::Borrowed(ValueRef::Text(v.query.as_bytes())),
366366
]
367-
}))
367+
})))
368368
.unwrap();
369369
}
370370
for v in exact.remainder() {

database/src/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ where
210210
}
211211

212212
async fn get(&self) -> ManagedConnection<T> {
213-
let permit = self.permits.clone().acquire_owned().await;
213+
let permit = self.permits.clone().acquire_owned().await.unwrap();
214214
let conn = {
215215
let mut slots = self.connections.lock().unwrap_or_else(|e| e.into_inner());
216216
slots.pop()

intern/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ version = "0.1.0"
44
authors = ["Mark Rousskov <[email protected]>"]
55
edition = "2018"
66

7-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8-
97
[dependencies]
108
bumpalo = "3.2"
11-
parking_lot = "0.10"
12-
arc-swap = "0.4"
13-
hashbrown = "0.7.0"
9+
parking_lot = "0.11"
10+
arc-swap = "1.3"
11+
hashbrown = "0.11"
1412
lazy_static = "1"
1513
serde = "1"
1614
serde_derive = "1"

site/Cargo.toml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,44 @@ version = "0.1.0"
55
edition = '2018'
66

77
[dependencies]
8-
env_logger = "0.7"
8+
env_logger = "0.8"
99
anyhow = "1"
1010
thiserror = "1"
1111
futures = "0.3"
12-
tokio = { version = "0.2", features = ["macros", "time"] }
12+
tokio = { version = "1.6", features = ["macros", "time"] }
1313
log = "0.4"
1414
serde = { version = "1", features = ["rc"] }
1515
serde_derive = "1"
1616
serde_json = "1"
17-
hyper = "0.13"
17+
hyper = { version = "0.14", features = ["server", "stream"] }
1818
headers = "0.3"
1919
http = "0.2"
2020
home = "0.5"
2121
chrono = "0.4"
22-
rmp-serde = "0.14.2"
23-
semver = "0.9"
22+
rmp-serde = "0.15"
23+
semver = "1.0"
2424
ring = "0.16.10"
2525
hex = "0.4.2"
2626
regex = "1"
2727
lazy_static = "1"
28-
reqwest = { version = "0.10", features = ["json", "blocking"] }
28+
reqwest = { version = "0.11", features = ["json", "blocking"] }
2929
toml = "0.5"
3030
rust_team_data = { git = "https://github.com/rust-lang/team" }
31-
parking_lot = "0.10"
31+
parking_lot = "0.11"
3232
snap = "1"
33-
rustc-artifacts = "0.2.2"
34-
itertools = "0.9"
35-
hashbrown = "0.7"
36-
arc-swap = "0.4"
37-
rusqlite = { version = "0.23", features = ["bundled"] }
33+
itertools = "0.10"
34+
hashbrown = { version = "0.11", features = ["serde"] }
35+
arc-swap = "1.3"
36+
rusqlite = { version = "0.25", features = ["bundled"] }
3837
async-trait = "0.1"
3938
database = { path = "../database" }
40-
bytes = "0.5.6"
39+
bytes = "1.0"
4140
url = "2"
4241
analyzeme = { git = "https://github.com/rust-lang/measureme" }
4342
tar = "0.4"
4443
inferno = { version="0.10", default-features = false }
4544
mime = "0.3"
46-
prometheus = "0.11"
45+
prometheus = "0.12"
4746

4847
[target.'cfg(unix)'.dependencies]
4948
jemallocator = "0.3"
@@ -54,4 +53,4 @@ path = "../collector"
5453

5554
[dev-dependencies]
5655
lazy_static = "1"
57-
pretty_assertions = "0.6"
56+
pretty_assertions = "0.7"

0 commit comments

Comments
 (0)