Commit ff6d1d32 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ngrams] some debugging info

parent ca606da8
Pipeline #3380 passed with stage
in 91 minutes and 38 seconds
...@@ -327,8 +327,8 @@ commitStatePatch listId (Versioned _p_version p) = do ...@@ -327,8 +327,8 @@ commitStatePatch listId (Versioned _p_version p) = do
assertValid $ transformable p q assertValid $ transformable p q
assertValid $ applicable p' (r ^. r_state) assertValid $ applicable p' (r ^. r_state)
-} -}
printDebug "[commitStatePatch] a version" (a ^. a_version) -- printDebug "[commitStatePatch] a version" (a ^. a_version)
printDebug "[commitStatePatch] a' version" (a' ^. a_version) -- printDebug "[commitStatePatch] a' version" (a' ^. a_version)
pure ( ns & unNodeStory . at listId .~ (Just a') pure ( ns & unNodeStory . at listId .~ (Just a')
, Versioned (a' ^. a_version) q' , Versioned (a' ^. a_version) q'
) )
...@@ -637,13 +637,14 @@ setNgramsTableScores :: forall env err m t. ...@@ -637,13 +637,14 @@ setNgramsTableScores :: forall env err m t.
-> t -> t
-> m t -> m t
setNgramsTableScores nId listId ngramsType table = do setNgramsTableScores nId listId ngramsType table = do
let ngrams_terms = table ^.. each . ne_ngrams
-- printDebug "ngrams_terms" ngrams_terms
t1 <- getTime t1 <- getTime
occurrences <- getOccByNgramsOnlyFast nId listId ngramsType occurrences <- getOccByNgramsOnlyFast nId listId ngramsType
--printDebug "occurrences" occurrences printDebug "[setNgramsTableScores] occurrences" occurrences
t2 <- getTime t2 <- getTime
liftBase $ hprint stderr liftBase $ do
let ngrams_terms = table ^.. each . ne_ngrams
-- printDebug "ngrams_terms" ngrams_terms
hprint stderr
("getTableNgrams/setScores #ngrams=" % int % " time=" % hasTime % "\n") ("getTableNgrams/setScores #ngrams=" % int % " time=" % hasTime % "\n")
(length ngrams_terms) t1 t2 (length ngrams_terms) t1 t2
let let
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment