Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
gargantext
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
Pipeline
#1112
failed with stage
Changes
2
Pipelines
1
Hide 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 =>
...
@@ -93,6 +93,10 @@ updateScatter :: FlowCmdM env err m =>
->
Maybe
Limit
->
Maybe
Limit
->
m
()
->
m
()
updateScatter
cId
maybeListId
tabType
maybeLimit
=
do
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
_
<-
updateScatter'
cId
maybeListId
tabType
maybeLimit
pure
()
pure
()
...
@@ -181,6 +185,10 @@ updateChart :: HasNodeError err =>
...
@@ -181,6 +185,10 @@ updateChart :: HasNodeError err =>
->
Maybe
Limit
->
Maybe
Limit
->
Cmd
err
()
->
Cmd
err
()
updateChart
cId
maybeListId
tabType
maybeLimit
=
do
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
_
<-
updateChart'
cId
maybeListId
tabType
maybeLimit
pure
()
pure
()
...
@@ -261,6 +269,10 @@ updatePie :: FlowCmdM env err m =>
...
@@ -261,6 +269,10 @@ updatePie :: FlowCmdM env err m =>
->
Maybe
Limit
->
Maybe
Limit
->
m
()
->
m
()
updatePie
cId
maybeListId
tabType
maybeLimit
=
do
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
_
<-
updatePie'
cId
maybeListId
tabType
maybeLimit
pure
()
pure
()
...
@@ -352,6 +364,10 @@ updateTree :: FlowCmdM env err m =>
...
@@ -352,6 +364,10 @@ updateTree :: FlowCmdM env err m =>
->
ListType
->
ListType
->
m
()
->
m
()
updateTree
cId
maybeListId
tabType
listType
=
do
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
_
<-
updateTree'
cId
maybeListId
tabType
listType
pure
()
pure
()
...
...
src/Gargantext/API/Ngrams.hs
View file @
994c72a7
...
@@ -120,8 +120,8 @@ import qualified Gargantext.API.Metrics as Metrics
...
@@ -120,8 +120,8 @@ import qualified Gargantext.API.Metrics as Metrics
import
Gargantext.API.Ngrams.Types
import
Gargantext.API.Ngrams.Types
import
Gargantext.Core.Types
(
ListType
(
..
),
NodeId
,
ListId
,
DocId
,
Limit
,
Offset
,
HasInvalidError
,
TODO
,
assertValid
)
import
Gargantext.Core.Types
(
ListType
(
..
),
NodeId
,
ListId
,
DocId
,
Limit
,
Offset
,
HasInvalidError
,
TODO
,
assertValid
)
import
Gargantext.Core.Utils
(
something
)
import
Gargantext.Core.Utils
(
something
)
import
Gargantext.Core.Viz.Graph.API
(
recomputeGraph
)
--
import Gargantext.Core.Viz.Graph.API (recomputeGraph)
import
Gargantext.Core.Viz.Graph.Distances
(
Distance
(
Conditional
))
--
import Gargantext.Core.Viz.Graph.Distances (Distance(Conditional))
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getOccByNgramsOnlyFast'
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getOccByNgramsOnlyFast'
)
import
Gargantext.Database.Query.Table.Node.Select
import
Gargantext.Database.Query.Table.Node.Select
import
Gargantext.Database.Query.Table.Ngrams
hiding
(
NgramsType
(
..
),
ngrams
,
ngramsType
,
ngrams_terms
)
import
Gargantext.Database.Query.Table.Ngrams
hiding
(
NgramsType
(
..
),
ngrams
,
ngramsType
,
ngrams_terms
)
...
@@ -346,29 +346,50 @@ tableNgramsPut tabType listId (Versioned p_version p_table)
...
@@ -346,29 +346,50 @@ tableNgramsPut tabType listId (Versioned p_version p_table)
node
<-
getNode
listId
node
<-
getNode
listId
let
nId
=
_node_id
node
let
nId
=
_node_id
node
uId
=
_node_userId
node
_
uId
=
_node_userId
node
mCId
=
_node_parentId
node
mCId
=
_node_parentId
node
printDebug
"[tableNgramsPut] updating graph with nId"
nId
-- printDebug "[tableNgramsPut] updating graph with nId" nId
printDebug
"[tableNgramsPut] updating graph with uId"
uId
-- printDebug "[tableNgramsPut] updating graph with uId" uId
_
<-
recomputeGraph
uId
nId
Conditional
-- _ <- recomputeGraph uId nId Conditional
printDebug
"[tableNgramsPut] tabType"
tabType
printDebug
"[tableNgramsPut] listId"
listId
_
<-
case
mCId
of
_
<-
case
mCId
of
Nothing
->
do
Nothing
->
do
printDebug
"[tableNgramsPut] can't update charts, no parent, nId"
nId
printDebug
"[tableNgramsPut] can't update charts, no parent, nId"
nId
pure
()
pure
()
Just
cId
->
do
Just
cId
->
do
printDebug
"[tableNgramsPut] updating scatter cId"
cId
case
tabType
of
_
<-
Metrics
.
updateScatter
cId
(
Just
listId
)
tabType
Nothing
Authors
->
do
printDebug
"[tableNgramsPut] updating chart cId"
cId
-- printDebug "[tableNgramsPut] Authors, updating Pie, cId" cId
_
<-
Metrics
.
updateChart
cId
(
Just
listId
)
tabType
Nothing
_
<-
Metrics
.
updatePie
cId
(
Just
listId
)
tabType
Nothing
printDebug
"[tableNgramsPut] updating pie cId"
cId
pure
()
_
<-
Metrics
.
updatePie
cId
(
Just
listId
)
tabType
Nothing
Institutes
->
do
printDebug
"[tableNgramsPut] updating tree StopTerm, cId"
cId
-- printDebug "[tableNgramsPut] Institutes, updating Tree, cId" cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
StopTerm
-- printDebug "[tableNgramsPut] updating tree StopTerm, cId" cId
printDebug
"[tableNgramsPut] updating tree CandidateTerm, cId"
cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
StopTerm
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
CandidateTerm
-- printDebug "[tableNgramsPut] updating tree CandidateTerm, cId" cId
printDebug
"[tableNgramsPut] updating tree MapTerm, cId"
cId
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
CandidateTerm
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
MapTerm
-- 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
_
<-
Metrics
.
updatePie
cId
(
Just
listId
)
tabType
Nothing
_
<-
Metrics
.
updateScatter
cId
(
Just
listId
)
tabType
Nothing
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
StopTerm
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
CandidateTerm
_
<-
Metrics
.
updateTree
cId
(
Just
listId
)
tabType
MapTerm
pure
()
_
->
do
printDebug
"[tableNgramsPut] no update for tabType = "
tabType
pure
()
pure
()
pure
()
pure
ret
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