Skip to content

Add hits_time_in_millis and misses_time_in_millis to enrich stats #2845

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

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Sep 2, 2024

This was done in elastic/elasticsearch#107579.

Unlike #2846, this went into 8.15, so I'll backport it. The two changes together will fix the enrich stats API response validation.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

Following you can find the validation results for the API you have changed.

API Status Request Response
enrich.stats 🔴 6/6 4/6

You can validate this API yourself by using the make validate target.

@@ -38,6 +38,10 @@ export class CacheStats {
node_id: Id
count: integer
hits: integer
/* The amount of time in milliseconds spent fetching data from the cache on successful cache hits only. */
hits_time_in_millis: long
Copy link
Member

Choose a reason for hiding this comment

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

We might want to use DurationValue<UnitMillis> here to carry additional semantics.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done in 1e187ac (#2845).

misses: integer
/* The amount of time in milliseconds spent fetching data from the enrich index and updating the cache, on cache misses only. */
misses_time_in_millis: long
Copy link
Member

Choose a reason for hiding this comment

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

idem

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done in 1e187ac (#2845).

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Following you can find the validation results for the API you have changed.

API Status Request Response
enrich.stats 🟢 6/6 6/6

You can validate this API yourself by using the make validate target.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Following you can find the validation results for the API you have changed.

API Status Request Response
enrich.stats 🟢 6/6 6/6

You can validate this API yourself by using the make validate target.

Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@pquentin pquentin merged commit ce74e92 into main Sep 3, 2024
6 checks passed
@pquentin pquentin deleted the enrich-stats-time-in-millis branch September 3, 2024 07:12
Copy link
Contributor

github-actions bot commented Sep 3, 2024

The backport to 8.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-2845-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ce74e928e9df6c9b73cee5a6ca90180c680718c7
# Push it to GitHub
git push --set-upstream origin backport-2845-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15

Then, create a pull request where the base branch is 8.15 and the compare/head branch is backport-2845-to-8.15.

pquentin added a commit that referenced this pull request Sep 3, 2024
)

* Add hits_time_in_millis and misses_time_in_millis to enrich stats

* Switch to DurationValue<UnitMillis>

(cherry picked from commit ce74e92)
pquentin added a commit that referenced this pull request Sep 3, 2024
…enrich stats (#2845) (#2848)

* Add hits_time_in_millis and misses_time_in_millis to enrich stats

* Switch to DurationValue<UnitMillis>

(cherry picked from commit ce74e92)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants