Skip to content
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

Merged
merged 6 commits into from
Feb 27, 2024
Merged

Conversation

VadimChernyshev
Copy link
Contributor

No description provided.

@@ -29,12 +29,16 @@ def __init__(self):
super().__init__()
self.queue_sizes = MetricsItems()
self.tasks_stats = TasksStats()
self.flow_steps_memory_usage = MetricsItems()
Copy link
Collaborator

@bugrimov bugrimov Feb 16, 2024

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())
Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

@bugrimov bugrimov left a 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

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

@bugrimov bugrimov merged commit c31b8d1 into avito-tech:main Feb 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants