-
Notifications
You must be signed in to change notification settings - Fork 2
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
Functionality aside from UseProfiler()? #21
Comments
Hey @christophwille , will this satisfy what you are looking for: You shall be able to do |
I know those, but: I want to ship the container, activated with C# (Use case: container startup is immediately stressing CPU and memory). Also I'd like to say stop the profile & upload (Use case: I know that ten seconds later the container crashes and the upload won't succeed any more if I do it later) |
Ah, let me confirm I understand you, this time :-). What you want is capabilities to run profiler by code. Some scenarios like:
So, you are looking for APIs like this (pseudo code): // _profilerService is injected
_profilerService.StartProfiler(duration: TimeSpan.FromSeconds(30)); // Run profiler, by code, for 30 seconds.
// Or something like:
if (memoryUsage > .7)
{
profilerService.StartProfiler(duration: TimeSpan.FromSeconds(15));
} Does that sound right? |
Yes, exactly those are the scenarios I outlined. Additionally, it would be nice to have a "manual" StopProfiler() capability - eg when I know that some operation I wanted to profile is done (background service, ...) |
@christophwille I see. Won't that been an issue if end up having huge trace files because the condition never met to stop the profiler? :-) |
Well, an option to say "and btw, collect a maximum of X MiB and then stop" would also be nice to have. |
Is there anything? Eg so I can say in code "Start profiler when memory > 40%" or "Start immediately and trace until minute 3"
Chris
The text was updated successfully, but these errors were encountered: