flamegraph-rs / flamegraph

Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow omitting default binary target

RagnarGrootKoerkamp opened this issue · comments

The readme indicates that cargo flamegraph is equivalent to cargo run --release. However, in my project with multiple binary targets it gives the following error:

Error: several possible targets found: [BinaryTarget { package: "astar-pairwise-aligner", target: "astar-pairwise-aligner", kind: ["bin"] }, BinaryTarget { package: "astar-pairwise-aligner", target: "proof", kind: ["bin"] }, BinaryTarget { package: "astar-pairwise-aligner", target: "generate_dataset", kind: ["bin"] }], please pass an explicit target.

It would be convenient to run the default binary (ie the name of the crate / the one set as default-run in cargo.toml).

Additionally it would be nice to allow the --release flag as a no-op, so that swapping run for flamegraph in cargo run -r -- <flags> just works.

Sounds good. Would you be able to contribute a PR?