Skip to content

Commit 13a59e8

Browse files
committed
benchmarkingish stuff
1 parent 000763c commit 13a59e8

File tree

1 file changed

+5
-0
lines changed
  • git-function-history-lib/src

1 file changed

+5
-0
lines changed

git-function-history-lib/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ impl<T> UwrapToError<T> for Option<T> {
548548

549549
#[cfg(test)]
550550
mod tests {
551+
use chrono::Utc;
552+
551553
use super::*;
552554
#[test]
553555
fn found_function() {
@@ -599,6 +601,7 @@ mod tests {
599601
}
600602
#[test]
601603
fn test_date() {
604+
let now = Utc::now();
602605
let output = get_function_history(
603606
"empty_test",
604607
FileType::None,
@@ -607,6 +610,8 @@ mod tests {
607610
"19 Aug 2022 23:45:52 +0000".to_owned(),
608611
),
609612
);
613+
let after = Utc::now() - now;
614+
println!("time taken: {}", after.num_seconds());
610615
match &output {
611616
Ok(functions) => {
612617
println!("{}", functions);

0 commit comments

Comments
 (0)