-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove duplicated copy of test_perf.hpp #1508
Conversation
using namespace gaia::common; | ||
using namespace gaia::direct_access; | ||
using namespace gaia::perf_basic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this namespace (and similar) be under gaia::benchmark
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the DAC namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simone-gaia is right. I don't think there is a way to shove in a benchmark
name in there. The namespace seems to be derived from the database name.
@@ -106,7 +112,7 @@ class accumulator_t | |||
|
|||
double_t percentage_difference(size_t expr, size_t plain) | |||
{ | |||
return static_cast<double_t>(expr - plain) / static_cast<double_t>(plain) * 100.0; | |||
return static_cast<double_t>(expr) - static_cast<double_t>(plain) / static_cast<double_t>(plain) * 100.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need parentheses around the whole numerator. I would also add parentheses around the whole fraction itself to clarify that the factor 100 is multiplying the rest of the expression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. ((static_cast<double_t>(expr) - static_cast<double_t>(plain)) / static_cast<double_t>(plain)) * 100.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points, good catch! I'll do this in next commit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple comments on parens and namespaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
32383a3
to
9b880f6
Compare
This ensures that we don't end up with diverging copies, as we make updates to these helpers.