Patchwork D9084: rust-dirstatemap: add #[timed] to dirstatemap read for comparison

login
register
mail settings
Submitter phabricator
Date Sept. 25, 2020, 4:05 p.m.
Message ID <differential-rev-PHID-DREV-q6pll7te475dhigrchyk-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47286/
State Superseded
Headers show

Comments

phabricator - Sept. 25, 2020, 4:05 p.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9084

AFFECTED FILES
  rust/hg-core/src/dirstate/dirstate_map.rs

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/dirstate/dirstate_map.rs b/rust/hg-core/src/dirstate/dirstate_map.rs
--- a/rust/hg-core/src/dirstate/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs
@@ -15,6 +15,7 @@ 
     CopyMap, DirsMultiset, DirstateEntry, DirstateError, DirstateMapError,
     DirstateParents, DirstateParseError, FastHashMap, StateMap,
 };
+use micro_timer::timed;
 use core::borrow::Borrow;
 use std::collections::HashSet;
 use std::convert::TryInto;
@@ -356,6 +357,7 @@ 
         self.dirty_parents = true;
     }
 
+    #[timed]
     pub fn read(
         &mut self,
         file_contents: &[u8],