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

chore: get rid of lispack stats #4644

Merged
merged 1 commit into from
Feb 24, 2025
Merged

chore: get rid of lispack stats #4644

merged 1 commit into from
Feb 24, 2025

Conversation

romange
Copy link
Collaborator

@romange romange commented Feb 22, 2025

They were wrong, we usually do not need them,
and they complicated code. The right way to do it - to add them to OBJHIST statistics.

In addition, did some other code improvements without functional changes.

@@ -51,6 +51,30 @@ bool StringSet::Add(string_view src, uint32_t ttl_sec) {
return true;
}

unsigned StringSet::AddMany(absl::Span<std::string_view> span, uint32_t ttl_sec) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from the header file

@@ -29,7 +29,7 @@ class StringSet : public DenseSet {
// Returns true if elem was added.
bool Add(std::string_view s1, uint32_t ttl_sec = UINT32_MAX);

template <typename T> unsigned AddMany(absl::Span<T> span, uint32_t ttl_sec);
unsigned AddMany(absl::Span<std::string_view> span, uint32_t ttl_sec);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed template

RETURN_ON_ERR(LoadKeyValPair(type, &settings));
int delta_ms = (absl::GetCurrentTimeNanos() - start) / 1000'000;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved inside LoadKeyValPair function

They were wrong, we usually do not need them,
and they complicated code. The right way to do it - to add them to OBJHIST statistics.

In addition, did some other code improvements without functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange requested review from adiholden and removed request for BorysTheDev and kostasrim February 23, 2025 06:26
Copy link
Contributor

@kostasrim kostasrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romange romange merged commit 5b986f7 into main Feb 24, 2025
10 checks passed
@romange romange deleted the Pr4 branch February 24, 2025 07:04
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.

None yet

2 participants