Add cargo xtask bench

This commit is contained in:
Louis Dureuil 2024-02-26 21:29:20 +01:00
parent b11df7ec34
commit 86ce843f3d
No known key found for this signature in database
6 changed files with 1370 additions and 7 deletions

View file

@ -1,6 +1,7 @@
use std::collections::HashSet;
use clap::Parser;
use xtask::bench::BenchDeriveArgs;
/// List features available in the workspace
#[derive(Parser, Debug)]
@ -17,13 +18,16 @@ struct ListFeaturesDeriveArgs {
#[command(bin_name = "cargo xtask")]
enum Command {
ListFeatures(ListFeaturesDeriveArgs),
Bench(BenchDeriveArgs),
}
fn main() {
fn main() -> anyhow::Result<()> {
let args = Command::parse();
match args {
Command::ListFeatures(args) => list_features(args),
Command::Bench(args) => xtask::bench::run(args)?,
}
Ok(())
}
fn list_features(args: ListFeaturesDeriveArgs) {