Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Hi, and thanks for this great library!
To sketch why I would love a more tight integration: I am currently hopping back and forth between commenting out
So, I opened this issue to discuss what features such "interface" should contain, and then to see how to design such interface. I'd happily dedicate some of my time to help making this a reality.
Features that I am thinking about:
In terms of implementation: I think we (or an external crate) could export a
Hey, thanks for the suggestion.
I can see you've put some thought into this, and I think your implementation ideas are reasonable. I was already planning a trait to allow external crates to plug in different measurements and such, so this would fit in well with the designs for 0.3.0 in #261.
Providing hooks to notify the profiler when each sample starts/ends seems to me like the right way to go. That should prevent much of the measurement machinery from showing up in the profiles. Criterion.rs should also provide a path to the benchmark directory so the profiler can store its data there.
As for including the profiler's results in the HTML reports, that would take some careful design. It's tempting to just call a function that returns some HTML text but I suspect that plugins would want a more powerful way to customize the reports so I'd prefer to build something more general. On the other hand, without examples of what they might want it's hard to know what would be appropriate.
I'll be reading through that issue. Thanks for the support!
Good thinking on the path.
Maybe we can postpone this with a future extension of the trait, since this is quite a specialized thing to do. I can see e.g. the profiler hooking into the parameters of a benchmark and highlighting differences somehow in the far future.
I've added support for profiler hooks to the
@rubdos - Could you try implementing a profiler hook to connect to
I currently am not profiling anything, but I hope to have something soon to test this on. Thanks for everything already!
Good, I was about to ask that! At first sight, your docs make sense.