Skip to content

Commit

Permalink
Merge pull request #1423 from rust-lang/lolperf
Browse files Browse the repository at this point in the history
Add basic runtime benchmark infrastructure
  • Loading branch information
Kobzol authored Oct 4, 2022
2 parents 2b9051a + 12cb796 commit 4b6d196
Show file tree
Hide file tree
Showing 12,179 changed files with 1,037 additions and 76 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
146 changes: 112 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["collector", "site", "database", "intern"]
exclude = ["collector/benchmarks", "rust/src"]
members = ["collector", "collector/benchlib", "site", "database", "intern"]
exclude = ["collector/compile-benchmarks", "collector/runtime-benchmarks", "rust/src"]

[profile.release.package.site]
debug = 1
Expand Down
2 changes: 2 additions & 0 deletions collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ filetime = "0.2.14"
walkdir = "2"
flate2 = { version = "1.0.22", features = ["rust_backend"] }
rayon = "1.5.2"
cargo_metadata = "0.15.0"
benchlib = { path = "benchlib" }

[target.'cfg(windows)'.dependencies]
miow = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Hardware and software details of the machine that executes the CI details can be

## The benchmarks

The individual benchmarks are described in the `README` file in the
`collector/benchmarks` directory.
The individual compile time benchmarks are described in the `README` file in the
`collector/compile-benchmarks` directory.

## How to build

Expand Down
18 changes: 18 additions & 0 deletions collector/benchlib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "benchlib"
version = "0.1.0"
edition = "2021"
description = "Library for defining and measuring benchmarks of Rust code"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.61"
serde = { version = "1.0.143", features = ["derive"] }
serde_json = "1.0.83"
log = "0.4.17"
env_logger = "0.9.0"
clap = { version = "3.2", features = ["derive"] }

[target.'cfg(unix)'.dependencies]
perf-event = "0.4.7"
Loading

0 comments on commit 4b6d196

Please sign in to comment.