Skip to content
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

Merged
merged 22 commits into from
Nov 6, 2020

Conversation

Smityz
Copy link
Contributor

@Smityz Smityz commented Oct 27, 2020

the implement of fine collector

Config changes

[pegasus.server]
+ fine_data_variance_threshold = 3

src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Show resolved Hide resolved
src/server/hotkey_collector.cpp Show resolved Hide resolved
@Smityz Smityz requested a review from hycdong October 29, 2020 07:58
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
Comment on lines 301 to 315
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);
}
};
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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?

src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
acelyc111
acelyc111 previously approved these changes Nov 5, 2020
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.h Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
src/server/hotkey_collector.cpp Outdated Show resolved Hide resolved
@neverchanje neverchanje merged commit aeb2a54 into apache:master Nov 6, 2020
@neverchanje neverchanje mentioned this pull request Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants