feat: add DHAT profiler (#52)

This commit is contained in:
Kevin Caffrey
2023-12-07 15:22:16 -05:00
committed by GitHub
parent 72e1283c11
commit ff6b542114
8 changed files with 404 additions and 5 deletions

View File

@@ -2,10 +2,17 @@ use std::process::{Command, Stdio};
use crate::template::Day;
pub fn handle(day: Day, release: bool, time: bool, submit_part: Option<u8>) {
pub fn handle(day: Day, release: bool, time: bool, dhat: bool, submit_part: Option<u8>) {
let mut cmd_args = vec!["run".to_string(), "--bin".to_string(), day.to_string()];
if release {
if dhat {
cmd_args.extend([
"--profile".to_string(),
"dhat".to_string(),
"--features".to_string(),
"dhat-heap".to_string(),
]);
} else if release {
cmd_args.push("--release".to_string());
}