Skip to content

Log the timestamps of each prefill/decode iteration #6094

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yuhsuan-t
Copy link
Contributor

Motivation

Logging the timestamps along with other stats helps with debugging performance issues

Modifications

Add timestamps to the prefill/decode logging functions.

Checklist

else:
f += f"#queue-req: {len(self.waiting_queue)}"

f += f", timestamp: {time.time()}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you going to use this time? Just observe it from the log?
If that's the case, do you want to make it a human readable time format?

>>> import time
>>> print(time.time())
1746766086.594933

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @hebiao064 , we actually have a script that parses the log, so the floating point makes sense to us. I can change it to human readable format if that's more useful. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @hebiao064 I changed the logging to ISO 8601 format. Can you review again? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @hebiao064 @Fridge003 , I have changed the code based on the review. Can you help review the PR again? Thank you :)

@yuhsuan-t yuhsuan-t force-pushed the yuhsuan-t/timestamp_logging branch from 7786e74 to aa5d598 Compare May 12, 2025 18:07
yuhsuan-t added 2 commits May 14, 2025 09:57
Logging the timestamps along with other stats helps with debugging performance issues
For better readability and parsability.
@yuhsuan-t yuhsuan-t force-pushed the yuhsuan-t/timestamp_logging branch from aa5d598 to 4957840 Compare May 14, 2025 16:57
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.

3 participants