{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/6309","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/6309/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/6309/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/6309/events","html_url":"https://github.com/rust-lang/cargo/pull/6309","id":379964576,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjc4MDQy","number":6309,"title":"Use \"test\" profile for `cargo build` benchmarks.","user":{"login":"ehuss","id":43198,"node_id":"MDQ6VXNlcjQzMTk4","avatar_url":"https://avatars0.githubusercontent.com/u/43198?v=4","gravatar_id":"","url":"https://api.github.com/users/ehuss","html_url":"https://github.com/ehuss","followers_url":"https://api.github.com/users/ehuss/followers","following_url":"https://api.github.com/users/ehuss/following{/other_user}","gists_url":"https://api.github.com/users/ehuss/gists{/gist_id}","starred_url":"https://api.github.com/users/ehuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehuss/subscriptions","organizations_url":"https://api.github.com/users/ehuss/orgs","repos_url":"https://api.github.com/users/ehuss/repos","events_url":"https://api.github.com/users/ehuss/events{/privacy}","received_events_url":"https://api.github.com/users/ehuss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-11-12T21:45:11Z","updated_at":"2018-11-13T03:30:13Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/6309","html_url":"https://github.com/rust-lang/cargo/pull/6309","diff_url":"https://github.com/rust-lang/cargo/pull/6309.diff","patch_url":"https://github.com/rust-lang/cargo/pull/6309.patch"},"body":"When using `cargo build` (without `--release`), build benchmarks using the \"test\" profile. This was causing some confusion where the benchmark is placed in the `target/debug` directory, and also causing some duplicates that may not be expected. It also makes it easier to debug benchmarks (previously you had to edit the `[profile.bench]` profile).\r\n\r\nCloses #5575, closes #6301, closes #4240, closes #4929.\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/438120083","html_url":"https://github.com/rust-lang/cargo/pull/6309#issuecomment-438120083","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/6309","id":438120083,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODEyMDA4Mw==","user":{"login":"ehuss","id":43198,"node_id":"MDQ6VXNlcjQzMTk4","avatar_url":"https://avatars0.githubusercontent.com/u/43198?v=4","gravatar_id":"","url":"https://api.github.com/users/ehuss","html_url":"https://github.com/ehuss","followers_url":"https://api.github.com/users/ehuss/followers","following_url":"https://api.github.com/users/ehuss/following{/other_user}","gists_url":"https://api.github.com/users/ehuss/gists{/gist_id}","starred_url":"https://api.github.com/users/ehuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehuss/subscriptions","organizations_url":"https://api.github.com/users/ehuss/orgs","repos_url":"https://api.github.com/users/ehuss/repos","events_url":"https://api.github.com/users/ehuss/events{/privacy}","received_events_url":"https://api.github.com/users/ehuss/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T03:30:13Z","updated_at":"2018-11-13T03:30:13Z","author_association":"CONTRIBUTOR","body":"> Is there a way in which this will break existing users?\r\n\r\nI think it is unlikely.  Today, using `cargo build` to build a benchmark works in a weird way. It builds the benchmark with the \"bench\" profile, but all dependencies use the \"dev\" (debug/unoptimized) profile.  If you use `--all-targets` or `--benches`, it is difficult/impossible to determine which artifact is the benchmark one, so I doubt anyone is relying on that.\r\n\r\n> Is there a change to when the profile sections in Cargo.toml apply?\r\n\r\nThe only change is that bench targets with `cargo build` go from \"bench\" profile to \"test\" profile.  `cargo build --release` is unchanged.\r\n\r\n>  If I run cargo bench (no --release) I am benchmarking optimized code. True? Before and After?\r\n\r\nPreviously, only the final target was optimized.  So if you had `benches/b1.rs`, the code in `b1.rs` uses the (optimized) \"bench\" profile, but all dependencies, like the linked `src/lib.rs`, are built with the \"dev\" (unoptimized) profile.  With this PR everything uses the corresponding debug/unoptimized profiles.\r\n"}}
{"actor":{"display_login":"ehuss"}}