Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
994c72a7
Commit
994c72a7
authored
Oct 01, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[metrics] better logging of what's going on
parent
87c88da5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
18 deletions
+55
-18
Metrics.hs
src/Gargantext/API/Metrics.hs
+16
-0
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+39
-18
No files found.
src/Gargantext/API/Metrics.hs
View file @
994c72a7
...
...
@@ -93,6 +93,10 @@ updateScatter :: FlowCmdM env err m =>
->
Maybe
Limit
->
m
()
updateScatter
cId
maybeListId
tabType
maybeLimit
=
do
printDebug
"[updateScatter] cId"
cId
printDebug
"[updateScatter] maybeListId"
maybeListId
printDebug
"[updateScatter] tabType"
tabType
printDebug
"[updateScatter] maybeLimit"
maybeLimit
_
<-
updateScatter'
cId
maybeListId
tabType
maybeLimit
pure
()
...
...
@@ -181,6 +185,10 @@ updateChart :: HasNodeError err =>
->
Maybe
Limit
->
Cmd
err
()
updateChart
cId
maybeListId
tabType
maybeLimit
=
do
printDebug
"[updateChart] cId"
cId
printDebug
"[updateChart] maybeListId"
maybeListId
printDebug
"[updateChart] tabType"
tabType
printDebug
"[updateChart] maybeLimit"
maybeLimit
_
<-
updateChart'
cId
maybeListId
tabType
maybeLimit
pure
()
...
...
@@ -261,6 +269,10 @@ updatePie :: FlowCmdM env err m =>
->
Maybe
Limit
->
m
()
updatePie
cId
maybeListId
tabType
maybeLimit
=
do
printDebug
"[updatePie] cId"
cId
printDebug
"[updatePie] maybeListId"
maybeListId
printDebug
"[updatePie] tabType"
tabType
printDebug
"[updatePie] maybeLimit"
maybeLimit
_
<-
updatePie'
cId
maybeListId
tabType
maybeLimit
pure
()
...
...
@@ -352,6 +364,10 @@ updateTree :: FlowCmdM env err m =>
->
ListType
->
m
()
updateTree
cId
maybeListId
tabType
listType
=
do
printDebug
"[updateTree] cId"
cId
printDebug
"[updateTree] maybeListId"
maybeListId
printDebug
"[updateTree] tabType"
tabType
printDebug
"[updateTree] listType"
listType
_
<-
updateTree'
cId
maybeListId
tabType
listType
pure
()
...
...
src/Gargantext/API/Ngrams.hs
View file @
994c72a7
...
...
@@ -120,8 +120,8 @@ import qualified Gargantext.API.Metrics as Metrics
import
Gargantext.API.Ngrams.Types
import
Gargantext.Core.Types
(
ListType
(
..
),
NodeId
,
ListId
,
DocId
,
Limit
,
Offset
,
HasInvalidError
,
TODO
,
assertValid
)
import
Gargantext.Core.Utils
(
something
)
import
Gargantext.Core.Viz.Graph.API
(
recomputeGraph
)
import
Gargantext.Core.Viz.Graph.Distances
(
Distance
(
Conditional
))
--
import Gargantext.Core.Viz.Graph.API (recomputeGraph)
--
import Gargantext.Core.Viz.Graph.Distances (Distance(Conditional))
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getOccByNgramsOnlyFast'
)
import
Gargantext.Database.Query.Table.Node.Select
import
Gargantext.Database.Query.Table.Ngrams
hiding
(
NgramsType
(
..
),
ngrams
,
ngramsType
,
ngrams_terms
)
...
...
@@ -346,30 +346,51 @@ tableNgramsPut tabType listId (Versioned p_version p_table)
node
<-
getNode
listId
let
nId
=
_node_id
node
uId
=
_node_userId
node
_
uId
=
_node_userId
node
mCId
=
_node_parentId
node
printDebug
"[tableNgramsPut] updating graph with nId"
nId
printDebug
"[tableNgramsPut] updating graph with uId"
uId
_
<-
recomputeGraph
uId
nId
Conditional
-- printDebug "[tableNgramsPut] updating graph with nId" nId
-- printDebug "[tableNgramsPut] updating graph with uId" uId
-- _ <- recomputeGraph uId nId Conditional
printDebug
"[tableNgramsPut] tabType"
tabType
printDebug
"[tableNgramsPut] listId"
listId
_
<-
case
mCId
of
Nothing
->
do
printDebug
"[tableNgramsPut] can't update charts, no parent, nId"
nId
pure
()
Just
cId
->
do
printDebug
"[tableNgramsPut] updating scatter cId"
cId
_
<-
Metrics
.
updateScatter
cId
(
Just
listId
)
tabType
Nothing
printDebug
"[tableNgramsPut] updating chart cId"
cId
case
tabType
of
Authors
->
do
-- printDebug "[tableNgramsPut] Authors, updating Pie, cId" cId
_
<-
Metrics
.
updatePie
cId
(
Just
listId
)
tabType
Nothing
pure
()
Institutes
->
do
-- printDebug "[tableNgramsPut] Institutes, updating Tree, cId" cId
-- printDebug "[tableNgramsPut] updating tree StopTerm, cId" cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
StopTerm
-- printDebug "[tableNgramsPut] updating tree CandidateTerm, cId" cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
CandidateTerm
-- printDebug "[tableNgramsPut] updating tree MapTerm, cId" cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
MapTerm
pure
()
Sources
->
do
-- printDebug "[tableNgramsPut] Sources, updating chart, cId" cId
_
<-
Metrics
.
updateChart
cId
(
Just
listId
)
tabType
Nothing
pure
()
Terms
->
do
-- printDebug "[tableNgramsPut] Terms, updating Metrics (Histo), cId" cId
_
<-
Metrics
.
updateChart
cId
(
Just
listId
)
tabType
Nothing
printDebug
"[tableNgramsPut] updating pie cId"
cId
_
<-
Metrics
.
updatePie
cId
(
Just
listId
)
tabType
Nothing
printDebug
"[tableNgramsPut] updating tree StopTerm, cId"
cId
_
<-
Metrics
.
updateScatter
cId
(
Just
listId
)
tabType
Nothing
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
StopTerm
printDebug
"[tableNgramsPut] updating tree CandidateTerm, cId"
cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
CandidateTerm
printDebug
"[tableNgramsPut] updating tree MapTerm, cId"
cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
MapTerm
pure
()
_
->
do
printDebug
"[tableNgramsPut] no update for tabType = "
tabType
pure
()
pure
()
pure
ret
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment