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 Result doesn't have any mutable method, which makes it hard to add custom variable or modify.
For example we have a relative(true) benchmark result and we would like to add the relative performance result. One may want to add it by setting the context varible, but find out context method is const.
A possible solution would be copy the result and use const_cast: auto& context = const_cast<string&>(result.context("myVar"));
But I don't think anyone would totally accept to use that cast in such situation.
The text was updated successfully, but these errors were encountered:
c0nstexpr
changed the title
[Feature Request] Editable Benchmark Results
[Feature Request] Mutable Benchmark Results
Jan 18, 2024
Currently
Result
doesn't have any mutable method, which makes it hard to add custom variable or modify.For example we have a
relative(true)
benchmark result and we would like to add the relative performance result. One may want to add it by setting the context varible, but find out context method is const.A possible solution would be copy the result and use
const_cast
:auto& context = const_cast<string&>(result.context("myVar"));
But I don't think anyone would totally accept to use that cast in such situation.
The text was updated successfully, but these errors were encountered: