wip, git:list:objects to display hashes

This commit is contained in:
voidlizard 2025-01-12 16:57:08 +03:00
parent ad13361266
commit cb3752da63
2 changed files with 8 additions and 6 deletions

View File

@ -956,7 +956,7 @@ theDict = do
idxPath <- getStatePath (AsBase58 reflog) <&> (</> "index") idxPath <- getStatePath (AsBase58 reflog) <&> (</> "index")
mkdir idxPath mkdir idxPath
notice $ "STATE" <+> pretty idxPath debug $ "STATE" <+> pretty idxPath
sink <- S.toList_ do sink <- S.toList_ do
walkMerkle (coerce what) (getBlock sto) $ \case walkMerkle (coerce what) (getBlock sto) $ \case
@ -1091,7 +1091,7 @@ theDict = do
(t1,r) <- timeItT (lift $ readCommitChainHPSQ req Nothing h0 dontHandle) (t1,r) <- timeItT (lift $ readCommitChainHPSQ req Nothing h0 dontHandle)
let s = HPSQ.size r let s = HPSQ.size r
notice $ pretty s <+> "new commits read at" <+> pretty (realToFrac @_ @(Fixed E3) t1) debug $ pretty s <+> "new commits read at" <+> pretty (realToFrac @_ @(Fixed E3) t1)
cap <- liftIO getNumCapabilities cap <- liftIO getNumCapabilities
gitCatBatchQ <- contWorkerPool cap do gitCatBatchQ <- contWorkerPool cap do
@ -1112,11 +1112,13 @@ theDict = do
<&> ([commit,tree]<>) <&> ([commit,tree]<>)
>>= \hs -> atomically (for_ hs (modifyTVar uniq_ . HS.insert)) >>= \hs -> atomically (for_ hs (modifyTVar uniq_ . HS.insert))
notice $ "all shit read" <+> pretty (realToFrac @_ @(Fixed E2) t3) debug $ "read new objects" <+> pretty (realToFrac @_ @(Fixed E2) t3)
(t4,new) <- lift $ timeItT $ readTVarIO uniq_ >>= indexFilterNewObjects idx (t4,new) <- lift $ timeItT $ readTVarIO uniq_ >>= indexFilterNewObjects idx
notice $ pretty (length new) <+> "new objects" <+> "at" <+> pretty (realToFrac @_ @(Fixed E2) t4) liftIO $ for_ new $ \n -> do
print $ pretty n
-- notice $ pretty (length new) <+> "new objects" <+> "at" <+> pretty (realToFrac @_ @(Fixed E2) t4)
entry $ bindMatch "reflog:tx:list" $ nil_ $ \syn -> lift $ connectedDo do entry $ bindMatch "reflog:tx:list" $ nil_ $ \syn -> lift $ connectedDo do

View File

@ -314,7 +314,7 @@ updateReflogIndex = do
atomically $ modifyTVar written_ (HS.insert txh) atomically $ modifyTVar written_ (HS.insert txh)
written <- readTVarIO written_ written <- readTVarIO written_
notice $ "read index at" <+> pretty (realToFrac @_ @(Fixed E2) t1) debug $ "read index at" <+> pretty (realToFrac @_ @(Fixed E2) t1)
flip runContT pure do flip runContT pure do
@ -326,7 +326,7 @@ updateReflogIndex = do
idxPath <- lift indexPath idxPath <- lift indexPath
mkdir idxPath mkdir idxPath
notice $ "STATE" <+> pretty idxPath debug $ "STATE" <+> pretty idxPath
sink <- S.toList_ do sink <- S.toList_ do
walkMerkle (coerce what) (getBlock sto) $ \case walkMerkle (coerce what) (getBlock sto) $ \case