-
Notifications
You must be signed in to change notification settings - Fork 540
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
[UX] minor optimizations for launch and introduce py-spy #4495
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
from typing import Callable, Iterator, List, Optional, TextIO, Type | ||
|
||
import colorama | ||
# slow due to https://github.com/python-pendulum/pendulum/issues/808 | ||
# FIXME(aylei): bump pendulum if it get fixed | ||
import pendulum | ||
Comment on lines
+8
to
10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can even get rid of this package, as we have also been observing inaccurate translation of the timestamp to readable time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any issue with this problem? If not, I'd like to open one as a followup~ |
||
import prettytable | ||
|
||
|
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.
In the future, it might be good to have the usage being called asynchronously.
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.
IIUC, concurrency using threads/coroutines cannot leverage multiple CPU cores due to GIL and the network IO in usage_lib (
_send_to_loki
) happens when cli exiting. It might be okay to send the log synchronously now, since we are going to wait for _send_to_loki complete anyway.