-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add initial support for pollcatch #18
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
Conversation
|
r? @rcoh |
| { | ||
| rt.on_before_task_poll(|_| async_profiler_agent::pollcatch::before_poll_hook()) | ||
| .on_after_task_poll(|_| async_profiler_agent::pollcatch::after_poll_hook()); |
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.
this has to be set in the builder right?
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.
yea
| } | ||
| } | ||
|
|
||
| impl super::profiler::ProfilerEngine for AsProf { |
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.
AsProf — I assume this means AsyncProfiler but since As is an english word common in Rust this is a bit confusing. Consider renaming to AsyncProfiler
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.
this was copied from the previous agent. I can rename.
| #[cfg(not(any( | ||
| all(target_arch = "x86_64", target_feature = "sse2"), | ||
| target_arch = "aarch64", | ||
| )))] | ||
| #[inline] | ||
| fn _now() -> u64 { | ||
| 0 | ||
| } |
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.
can we emit a deprecation in this case? Or some sort of warning?
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.
the general sense is that async-profiler only support x86 and ARM anyway
| pub fn main() -> anyhow::Result<()> { | ||
| let mut rt: tokio::runtime::Builder = tokio::runtime::Builder::new_multi_thread(); | ||
| rt.enable_all(); |
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.
can you file an issue for turning an example into an integration test that we can run to validate future changes?
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.
opened #19
📬 Issue #, if available:
✍️ Description of changes:
🔏 By submitting this pull request