From 6c1d9e529b55a58e8b9291e5bf2716e82a2d57c3 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sun, 25 Apr 2021 14:50:44 +0200 Subject: [PATCH] add timing --- asyncgit/src/sync/blame.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/asyncgit/src/sync/blame.rs b/asyncgit/src/sync/blame.rs index d392b93c..da9ffb63 100644 --- a/asyncgit/src/sync/blame.rs +++ b/asyncgit/src/sync/blame.rs @@ -5,6 +5,7 @@ use crate::{ error::{Error, Result}, sync::get_commits_info, }; +use scopetime::scope_time; use std::collections::{HashMap, HashSet}; use std::io::{BufRead, BufReader}; use std::path::Path; @@ -53,6 +54,8 @@ pub fn blame_file( //TODO: remove until we actually use this on specific commits, right now not even the unittests cover this blame_at: &BlameAt, ) -> Result { + scope_time!("blame_file"); + let repo = utils::repo(repo_path)?; let commit_id = match blame_at { BlameAt::Head => utils::get_head_repo(&repo)?,