add debugging for reconcileStaged calls for benchmarking
This commit is contained in:
parent
13b9a288d3
commit
1a6fa5abc8
2 changed files with 29 additions and 0 deletions
|
@ -240,6 +240,7 @@ reconcileStaged qh = do
|
||||||
go cur indexcache (Just newtree) = do
|
go cur indexcache (Just newtree) = do
|
||||||
oldtree <- getoldtree
|
oldtree <- getoldtree
|
||||||
when (oldtree /= newtree) $ do
|
when (oldtree /= newtree) $ do
|
||||||
|
fastDebug "Database.Keys" "reconcileStaged start"
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
void $ catstream $ \mdfeeder ->
|
void $ catstream $ \mdfeeder ->
|
||||||
void $ updatetodiff g
|
void $ updatetodiff g
|
||||||
|
@ -251,6 +252,7 @@ reconcileStaged qh = do
|
||||||
-- get garbage collected, and is available to diff
|
-- get garbage collected, and is available to diff
|
||||||
-- against next time.
|
-- against next time.
|
||||||
inRepo $ update' lastindexref newtree
|
inRepo $ update' lastindexref newtree
|
||||||
|
fastDebug "Database.Keys" "reconcileStaged end"
|
||||||
-- git write-tree will fail if the index is locked or when there is
|
-- git write-tree will fail if the index is locked or when there is
|
||||||
-- a merge conflict. To get up-to-date with the current index,
|
-- a merge conflict. To get up-to-date with the current index,
|
||||||
-- diff --staged with the old index tree. The current index tree
|
-- diff --staged with the old index tree. The current index tree
|
||||||
|
@ -262,6 +264,7 @@ reconcileStaged qh = do
|
||||||
-- version of the files that are conflicted. So a second diff
|
-- version of the files that are conflicted. So a second diff
|
||||||
-- is done, with --staged but no old tree.
|
-- is done, with --staged but no old tree.
|
||||||
go _ _ Nothing = do
|
go _ _ Nothing = do
|
||||||
|
fastDebug "Database.Keys" "reconcileStaged start (in conflict)"
|
||||||
oldtree <- getoldtree
|
oldtree <- getoldtree
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
catstream $ \mdfeeder -> do
|
catstream $ \mdfeeder -> do
|
||||||
|
@ -270,6 +273,7 @@ reconcileStaged qh = do
|
||||||
when conflicted $
|
when conflicted $
|
||||||
void $ updatetodiff g Nothing "--staged"
|
void $ updatetodiff g Nothing "--staged"
|
||||||
(procmergeconflictdiff mdfeeder)
|
(procmergeconflictdiff mdfeeder)
|
||||||
|
fastDebug "Database.Keys" "reconcileStaged end"
|
||||||
|
|
||||||
updatetodiff g old new processor = do
|
updatetodiff g old new processor = do
|
||||||
(l, cleanup) <- pipeNullSplit' (diff old new) g
|
(l, cleanup) <- pipeNullSplit' (diff old new) g
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 11"""
|
||||||
|
date="2021-06-08T15:41:23Z"
|
||||||
|
content="""
|
||||||
|
I can't think of anything OSX specific in the recent changes.
|
||||||
|
|
||||||
|
I have added debugging of when reconcileStaged wakes up and possibly
|
||||||
|
wastes some time, eg:
|
||||||
|
|
||||||
|
joey@darkstar:~/tmp/big> git config annex.debug true
|
||||||
|
joey@darkstar:~/tmp/big> git config annex.debugfilter Database.Keys
|
||||||
|
joey@darkstar:~/tmp/big> git-annex init
|
||||||
|
init
|
||||||
|
[2021-06-08 11:52:11.854202926] (Database.Keys) reconcileStaged start
|
||||||
|
(scanning for annexed files...)
|
||||||
|
[2021-06-08 11:52:44.092620256] (Database.Keys) reconcileStaged end
|
||||||
|
ok
|
||||||
|
|
||||||
|
All the new work happens in between those two debugs, so you could check if
|
||||||
|
the time sink is there or elsewhere.
|
||||||
|
|
||||||
|
(Note that the last release takes 2 seconds longer for that init than
|
||||||
|
it does now..)
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue