-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ecf847
commit 31a1ce6
Showing
7 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[profile.release-with-debug] | ||
inherits = "release" | ||
debug = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ target/ | |
rustc-ice* | ||
|
||
.idea | ||
|
||
flamegraph.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "profile" | ||
version = "0.1.0" | ||
license.workspace = true | ||
edition.workspace = true | ||
authors.workspace = true | ||
description.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
rust-version.workspace = true | ||
publish = false | ||
|
||
[dependencies] | ||
omics-coordinate = { path = "../omics-coordinate" } | ||
|
||
clap = { version = "4", features = ["derive"] } | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//! Profiling of contigs. | ||
pub mod alloc; | ||
|
||
use clap::Parser; | ||
use clap::Subcommand; | ||
|
||
/// The different aspects of contigs that can be profiled. | ||
#[derive(Subcommand)] | ||
pub enum Command { | ||
/// Allocations of contigs. | ||
Alloc(alloc::Args), | ||
} | ||
|
||
/// Profiling of contigs. | ||
#[derive(Parser)] | ||
pub struct Args { | ||
/// The subcommand. | ||
#[command(subcommand)] | ||
command: Command, | ||
} | ||
|
||
/// The main method. | ||
pub fn main(args: Args) { | ||
match args.command { | ||
Command::Alloc(args) => alloc::main(args), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! Profiling of contig allocations. | ||
use std::hint::black_box; | ||
|
||
use clap::Parser; | ||
use omics_coordinate::Contig; | ||
|
||
/// Profiling of contig allocations. | ||
#[derive(Parser, Debug)] | ||
pub struct Args { | ||
/// The number of allocations to use. | ||
#[arg(default_value_t = 100_000_000)] | ||
n: usize, | ||
} | ||
|
||
/// The main method. | ||
pub fn main(args: Args) { | ||
for _ in 0..args.n { | ||
let _ = black_box(Contig::new("seq0")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! A profiling tool for developing `omics`. | ||
use clap::Parser; | ||
use clap::Subcommand; | ||
|
||
pub mod contig; | ||
|
||
/// The different entities that can be profiled. | ||
#[derive(Subcommand)] | ||
pub enum Command { | ||
/// Contig profiling. | ||
Contig(contig::Args), | ||
} | ||
|
||
/// Profiling of `omics` entities. | ||
#[derive(Parser)] | ||
pub struct Args { | ||
/// The subcommand. | ||
#[command(subcommand)] | ||
command: Command, | ||
} | ||
|
||
/// The main method. | ||
pub fn main() { | ||
let args = Args::parse(); | ||
|
||
match args.command { | ||
Command::Contig(args) => contig::main(args), | ||
} | ||
} |