webgraph_cli/bench/
mod.rs

1/*
2 * SPDX-FileCopyrightText: 2023 Tommaso Fontana
3 *
4 * SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
5 */
6
7use anyhow::Result;
8use clap::Subcommand;
9
10use super::GlobalArgs;
11
12pub mod bf_visit;
13pub mod bvgraph;
14
15#[derive(Subcommand, Debug)]
16#[command(name = "bench")]
17/// A few benchmark utilities.
18pub enum SubCommands {
19    Bvgraph(bvgraph::CliArgs),
20    BFVisit(bf_visit::CliArgs),
21}
22
23pub fn main(global_args: GlobalArgs, subcommand: SubCommands) -> Result<()> {
24    match subcommand {
25        SubCommands::Bvgraph(args) => bvgraph::main(global_args, args),
26        SubCommands::BFVisit(args) => bf_visit::main(global_args, args),
27    }
28}