mirror of
https://github.com/clearml/clearml-server
synced 2025-02-07 13:33:42 +00:00
Ensure min interval on workers history charts so that we do not get "saw like" chart due to the missing points in the intervals
This commit is contained in:
parent
beff19e104
commit
0496582d96
@ -13,6 +13,8 @@ log = config.logger(__file__)
|
|||||||
|
|
||||||
|
|
||||||
class WorkerStats:
|
class WorkerStats:
|
||||||
|
min_chart_interval = config.get("services.workers.min_chart_interval_sec", 40)
|
||||||
|
|
||||||
def __init__(self, es):
|
def __init__(self, es):
|
||||||
self.es = es
|
self.es = es
|
||||||
|
|
||||||
@ -203,6 +205,7 @@ class WorkerStats:
|
|||||||
"""
|
"""
|
||||||
if from_date >= to_date:
|
if from_date >= to_date:
|
||||||
raise bad_request.FieldsValueError("from_date must be less than to_date")
|
raise bad_request.FieldsValueError("from_date must be less than to_date")
|
||||||
|
interval = max(interval, self.min_chart_interval)
|
||||||
|
|
||||||
must = [QueryBuilder.dates_range(from_date, to_date)]
|
must = [QueryBuilder.dates_range(from_date, to_date)]
|
||||||
if active_only:
|
if active_only:
|
||||||
|
5
apiserver/config/default/services/workers.conf
Normal file
5
apiserver/config/default/services/workers.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
default_worker_timeout_sec: 600
|
||||||
|
default_cluster_timeout_sec: 600
|
||||||
|
|
||||||
|
# The minimal sampling interval for resource dashboard and worker activity charts
|
||||||
|
min_chart_interval_sec: 40
|
Loading…
Reference in New Issue
Block a user