Skip to content
Snippets Groups Projects
Commit 9ac5e60e authored by Jan Mach's avatar Jan Mach
Browse files

Added truncations to postcalculated comparison statistics.

To be more comparable and reduce tha amount of data transfered to the browser. (Redmine issue: #6308)
parent 6b16894d
No related branches found
No related tags found
No related merge requests found
......@@ -20,4 +20,4 @@ open-source project.
__author__ = "Jan Mach <jan.mach@cesnet.cz>"
__credits__ = "Pavel Kácha <pavel.kacha@cesnet.cz>, Andrea Kropáčová <andrea.kropacova@cesnet.cz>"
__version__ = "2.6.25"
__version__ = "2.6.26"
......@@ -506,11 +506,13 @@ def postcalculate_dbstats_events(aggr_name, result):
"""
result.setdefault('postcalc', {})
result['postcalc'][ST_SKEY_CNT_EVENTS] = result[ST_SKEY_CNT_EVENTS]
result['postcalc'].setdefault(aggr_name, {})
for tlbucket in result[ST_SKEY_TIMELINE]:
if aggr_name in tlbucket[1]:
for key, value in tlbucket[1][aggr_name].items():
_counter_inc(result['postcalc'], aggr_name, key, value)
result['postcalc'] = truncate_stats(result['postcalc'])
def evaluate_dbstats_events(stats):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment