-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat(hotkey): capture data part3 - declare fine collector #631
Conversation
src/server/hotkey_collector.cpp
Outdated
struct blob_hash | ||
{ | ||
std::size_t operator()(const dsn::blob &str) const | ||
{ | ||
dsn::string_view cp(str); | ||
return boost::hash_range(cp.begin(), cp.end()); | ||
} | ||
}; | ||
struct blob_equal | ||
{ | ||
std::size_t operator()(const dsn::blob &lhs, const dsn::blob &rhs) const | ||
{ | ||
return dsn::string_view(lhs) == dsn::string_view(rhs); | ||
} | ||
}; |
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.
Better to move to class dsn::blob
's definition, then you can reuse it easily.
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.
// blob.h
bool operator==(const blob &r) const
{
// not implemented
assert(false);
return false;
}
The default method is deleted, I think in different scenarios ==
has different meanings
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.
How the ==
operator of a class can have different behaviors?
Co-authored-by: Yingchun Lai <[email protected]>
Co-authored-by: Wu Tao <[email protected]>
Co-authored-by: Wu Tao <[email protected]>
Co-authored-by: Wu Tao <[email protected]>
Co-authored-by: Wu Tao <[email protected]>
the implement of fine collector
Config changes
[pegasus.server] + fine_data_variance_threshold = 3