-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory usage metrics #49
memory usage metrics #49
Conversation
aqueduct/metrics/collect.py
Outdated
@@ -29,12 +29,16 @@ def __init__(self): | |||
super().__init__() | |||
self.queue_sizes = MetricsItems() | |||
self.tasks_stats = TasksStats() | |||
self.flow_steps_memory_usage = MetricsItems() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no another memory usage metrics planned, so t will be good if you rename flow_steps_memory_usage
into memory_usage
everywhere in this PR
aqueduct/flow.py
Outdated
@@ -302,6 +315,7 @@ def _run_tasks(self): | |||
self._tasks.append(asyncio.ensure_future(self._check_is_alive())) | |||
|
|||
self._metrics_manager.start(queues_info=self._get_queues_info()) | |||
self._metrics_manager.collector.add_flow_steps_memory_usage(self._get_flow_steps_memory_usage()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems run only once at start. For regular run you need add while True
inside _get_flow_steps_memory_usage
with some sleep time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct to replace while True
with while self.state != FlowState.STOPPED
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some little work needed
aqueduct/flow.py
Outdated
@@ -5,6 +5,7 @@ | |||
import queue | |||
import signal | |||
import sys | |||
import psutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a standard module
You need to add it to setup.py
to required
And to requirements/dev.txt
No description provided.