-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
metric(multiprocessing): Add metric to track time it takes to prepare and submit batch #352
base: main
Are you sure you want to change the base?
Conversation
if self.__last_batch_time == 0.0: | ||
self.__last_batch_time = time.time() | ||
else: | ||
self.__metrics.timing("arroyo.strategies.run_task_with_multiprocessing.batch.build_and_submit_time", time.time() - self.__last_batch_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.
I think you also need to reset self.__last_batch_time to 0 here.
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.
Oops forgot that line. I think we need to reset it to the current time (so that we have the time that the previous batch was submitted)
Need to fix the tests since the |
arroyo/utils/metric_defs.py
Outdated
@@ -98,4 +98,6 @@ | |||
"arroyo.processing.strategies.healthcheck.touch", | |||
# Number of messages dropped in the FilterStep strategy | |||
"arroyo.strategies.filter.dropped_messages", | |||
# The amount of time it takes for the multiprocessing batch to be built and submitted to subprocesses | |||
"arroyo.strategies.run_task_with_multiprocessing.batch.build_and_submit_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.
"arroyo.strategies.run_task_with_multiprocessing.batch.build_and_submit_time" | |
"arroyo.strategies.run_task_with_multiprocessing.batch_build_and_submit_time" |
No description provided.