You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there exists new to create from a function name and parameter, and from_parameter for creating just from a parameter. IntoBenchmarkId lets strings become a BenchmarkId with just a function name, yet it isn't publicly exported.
Why is this needed:
Some methods, such as bench_with_input on Criterion, take a BenchmarkId instead of any IntoBenchmarkId. This could be changed to take a generic, but I think even if that happens it makes sense to add this functionality anyways.
Desired solution:
A from_function or similar function to create a BenchmarkId with just a function name
The text was updated successfully, but these errors were encountered:
I just realized that bench_with_input internally unwraps parameter - so this wouldn't work nicely with how the library treats benchmark IDs. I guess this may just be me using the library not how it was expected, is there a 'proper' way to provide the bench of a function with a parameter when you're just using it as a way to automatically black-box the parameter (such as to provide a &self to every call)?
The problem:
Currently, there exists
new
to create from a function name and parameter, andfrom_parameter
for creating just from a parameter.IntoBenchmarkId
lets strings become aBenchmarkId
with just a function name, yet it isn't publicly exported.Why is this needed:
Some methods, such as
bench_with_input
onCriterion
, take aBenchmarkId
instead of anyIntoBenchmarkId
. This could be changed to take a generic, but I think even if that happens it makes sense to add this functionality anyways.Desired solution:
A
from_function
or similar function to create aBenchmarkId
with just a function nameThe text was updated successfully, but these errors were encountered: