Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mentat-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
mentat-test
Commits
82969ae4
Commit
82969ae4
authored
7 years ago
by
Jan Mach
Browse files
Options
Downloads
Patches
Plain Diff
Added missing call for RRD chart generation into mentat-statistician.py module.
(Redmine issue:
#3379
)
parent
c5e81274
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mentat/module/statistician.py
+32
-14
32 additions, 14 deletions
lib/mentat/module/statistician.py
with
32 additions
and
14 deletions
lib/mentat/module/statistician.py
+
32
−
14
View file @
82969ae4
...
...
@@ -281,6 +281,8 @@ class MentatStatisticianScript(mentat.script.fetcher.FetcherScript):
self
.
_update_rrds
(
result
,
time_high
)
self
.
_generate_charts
(
time_high
)
result
=
mentat
.
stats
.
idea
.
brief_stats_full
(
result
)
result
=
mentat
.
stats
.
idea
.
escape_stats_full
(
result
)
...
...
@@ -306,36 +308,52 @@ class MentatStatisticianScript(mentat.script.fetcher.FetcherScript):
rrds
=
self
.
stats_rrd
.
find_dbs
()
try
:
for
itm
in
((
'
nodename
'
,
'
detectors
'
),
(
'
nodesw
'
,
'
analyzers
'
),
(
'
category
'
,
'
categories
'
)):
total
=
0
updated
=
{}
for
itm
in
((
'
nodename
'
,
'
detectors
'
),
(
'
nodesw
'
,
'
analyzers
'
),
(
'
category
'
,
'
categories
'
)):
total
=
0
updated
=
{}
for
(
stat_key
,
stat_value
)
in
stats
[
itm
[
1
]].
items
():
for
(
stat_key
,
stat_value
)
in
stats
[
itm
[
1
]].
items
()
:
try
:
db_name
=
self
.
stats_rrd
.
clean
(
stat_key
)
self
.
logger
.
info
(
"
Updating RRD DB
'
{}.{}
'
statistics with value
'
{}
'
and timestamp
'
{}
'
:
'
{}
'"
.
format
(
itm
[
0
],
stat_key
,
stat_value
,
str
(
tstamp
),
utstamp
))
self
.
_rrd_update_database
(
itm
[
0
],
stat_key
,
tstamp
,
stat_value
)
updated
[
db_name
]
=
1
total
+=
stat_value
except
mentat
.
stats
.
rrd
.
RrdsUpdateException
as
exc
:
self
.
logger
.
error
(
str
(
exc
))
try
:
self
.
logger
.
info
(
"
Updating RRD DB
'
{}.{}
'
total statistics with value
'
{}
'
and timestamp
'
{}
'
:
'
{}
'"
.
format
(
itm
[
0
],
mentat
.
stats
.
rrd
.
DB_TOTALS_NAME
,
stat_value
,
str
(
tstamp
),
utstamp
))
self
.
_rrd_update_database
(
itm
[
0
],
mentat
.
stats
.
rrd
.
DB_TOTALS_NAME
,
tstamp
,
total
)
updated
[
mentat
.
stats
.
rrd
.
DB_TOTALS_NAME
]
=
1
except
mentat
.
stats
.
rrd
.
RrdsUpdateException
as
exc
:
self
.
logger
.
error
(
str
(
exc
))
if
itm
[
0
]
not
in
rrds
:
continue
if
itm
[
0
]
not
in
rrds
:
continue
for
rrddb
in
rrds
[
itm
[
0
]]:
if
db_name
in
updated
or
db_name
==
mentat
.
stats
.
rrd
.
DB_TOTALS_NAME
:
continue
for
rrddb
in
rrds
[
itm
[
0
]]:
if
db_name
in
updated
or
db_name
==
mentat
.
stats
.
rrd
.
DB_TOTALS_NAME
:
continue
try
:
self
.
logger
.
info
(
"
Updating RRD DB
'
{}.{}
'
statistics with default value
'
0
'
and timestamp
'
{}
'
:
'
{}
'"
.
format
(
itm
[
0
],
rrddb
[
2
],
str
(
tstamp
),
utstamp
))
self
.
_rrd_update_database
(
itm
[
0
],
rrddb
[
2
],
tstamp
,
0
)
except
mentat
.
stats
.
rrd
.
RrdsUpdateException
as
exc
:
self
.
logger
.
error
(
str
(
exc
))
except
mentat
.
stats
.
rrd
.
RrdsUpdateException
as
exc
:
self
.
logger
.
error
(
str
(
exc
))
def
_generate_charts
(
self
,
tstamp
):
"""
"""
utstamp
=
int
(
tstamp
.
timestamp
())
result
=
self
.
stats_rrd
.
generate
(
utstamp
)
self
.
runlog
[
'
generated_files
'
]
=
result
def
_rrd_update_all
(
self
,
tstamp
,
value
=
0
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment