-
Notifications
You must be signed in to change notification settings - Fork 163
feat: add --iterations flags to specify how many times to run target binary #332
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
base: main
Are you sure you want to change the base?
Conversation
I'm honestly not sure this is a good fit? The current implementation doesn't seem like it would work for non- |
I’m honestly not sure what the problem you see here is but I think being able to tweak the number of iterations that end up in the graph is generally useful. Are there other backends available today? Beyond the specific implementation here, what is it about |
I can see how it is generally useful, but it's not obviously a good conceptual fit for flamegraph, whose entire paradigm is currently about (a) executing a workload (using any of 3 backends, perf, dtrace or blondie), and then (b) processing the profile output from the backend. This seems to add a substantial intermediate conceptual step in, and you haven't even attempted to make it work with the other backends (and it's not clear that that's possible). |
I see, well, I’m happy to have a stab at looking into what would be required for the other backends so we can see how well/poorly it fits. |
Ok, so I had another look at the code, trying to better understand how the different backends are implemented. As far as I can see they are not cleanly separated or isolated by way of an API. Rather, my impression is that On I am not sure how the On On Overall this PR, while incomplete as outlined above, takes an approach that is consistent with the rest of the code base: do the simplest thing that works. Sure, there are warts and a few code smells here and there, but fixing that is certainly not what this PR tries to do. |
Alright, keeping it simple is reasonable though I'd like a few more comments about why/where the implemented approach works, and it would be good to make sure stuff on Windows doesn't get broken (or simply doesn't implement this option?). (Sorry for the slow feedback.) |
As discussed here, PR #255 seems to have stalled a bit.
This PR takes @bartlomieju's PR (#255) and addresses the review concerns. See the PR description in #255 for a detailed description of what the changes mean.