Skip to content

Add serde_derive-1.0.136 #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions collector/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ They mostly consist of real-world crates.
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility.
- **serde-1.0.136**: A serialization/deserialization crate. Used by many other
Rust programs.
- **serde_derive-1.0.136**: A proc-macro sub-crate used by `serde`. Used by
many other Rust programs. Stresses declarative macro expansion somewhat.
- **stm32f4-0.14.0**: A crate that has many thousands of blanket impl blocks.
It uses cargo features to enable large portions of its structure and is
built with `--features=stm32f410` to have faster benchmarking times.
Expand Down Expand Up @@ -96,8 +98,8 @@ compiler in interesting ways.
actix-web and other libraries with similarly nested type combinators.
- **regression-31157**: A small program that caused a [large performance
regression](https://github.com/rust-lang/rust/issues/31157) from the past.
- **token-stream-stress**: Constructs a long token stream much like the `quote`
crate does, which caused [quadratic
- **token-stream-stress**: A proc-macro crate. Constructs a long token stream
much like the `quote` crate does, which caused [quadratic
behavior](https://github.com/rust-lang/rust/issues/65080) in the past.
- **tt-muncher**: Calls a quadratic TT muncher macro (based on `quote::quote!`)
with a long input, which stresses macro expansion.
Expand Down Expand Up @@ -188,13 +190,8 @@ Rust code being written today.
applies correctly, e.g. `target/release/collector bench_local +nightly
--id Test --profiles=Check --scenarios=IncrPatched
--include=$NEW_BENCHMARK`
- `git grep` for occurrences of the old benchmark name (e.g. in
`.github/workflows/ci.yml` or `ci/check-*.sh`) and see if anything similar
needs doing for the new benchmark... usually not.
- Add the new entry to `collector/benchmarks/README.md`. Don't remove the
entry for the old benchmark yet.
- Compare benchmarking time for the old and new versions of the benchmark.
(It's useful to know if the new one is a lot slower than the old one.)
- Add the new entry to `collector/benchmarks/README.md`.
- Consider the benchmarking time for the benchmark.
- First, measure the entire compilation time with something like this, by
doing this within the benchmark directory is good:
```
Expand Down Expand Up @@ -230,9 +227,13 @@ Rust code being written today.

## Update a benchmark

- Do this in two steps. First add the new version of the benchmark. Once the PR
is merged, make sure it's running correctly. Second, remove the old version
of the benchmark. Doing it in two steps ensures we have continuity of
profiling coverage in the case where something goes wrong.
- Do this in two steps.
- First add the new version of the benchmark. Compare the benchmarking time
of the two versions to make sure nothing outrageous has happened. Once the
PR is merged, make sure it's running correctly.
- Second, remove the old version of the benchmark.
Doing it in two steps ensures we have continuity of profiling coverage in the
case where something goes wrong.
- Compare the benchmarking time of the two versions.
- When adding the new version, for `perf-config.json` and the `N-*.patch`
files, use the corresponding files for the old version as a starting point.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git": {
"sha1": "02bd79a0bada78dd88d050f6478806f001f41fb0"
},
"path_in_vcs": "serde_derive"
}
13 changes: 13 additions & 0 deletions collector/benchmarks/serde_derive-1.0.136/0-println.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/de.rs b/src/de.rs
index ff7bc42f..d51d2954 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -17,6 +17,8 @@ use std::ptr;
pub fn expand_derive_deserialize(
input: &mut syn::DeriveInput,
) -> Result<TokenStream, Vec<syn::Error>> {
+ println!("testing");
+
replace_receiver(input);

let ctxt = Ctxt::new();
54 changes: 54 additions & 0 deletions collector/benchmarks/serde_derive-1.0.136/Cargo.lock

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

46 changes: 46 additions & 0 deletions collector/benchmarks/serde_derive-1.0.136/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
rust-version = "1.31"
name = "serde_derive"
version = "1.0.136"
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"]
include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
homepage = "https://serde.rs"
documentation = "https://serde.rs/derive.html"
readme = "crates-io.md"
keywords = ["serde", "serialization", "no_std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/serde-rs/serde"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[lib]
name = "serde_derive"
proc-macro = true
[dependencies.proc-macro2]
version = "1.0"

[dependencies.quote]
version = "1.0"

[dependencies.syn]
version = "1.0.60"
[dev-dependencies.serde]
version = "1.0"

[features]
default = []
deserialize_in_place = []

[workspace]
32 changes: 32 additions & 0 deletions collector/benchmarks/serde_derive-1.0.136/Cargo.toml.orig

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

Loading