-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add extra DLS stats in x-pack usage #132807
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
Conversation
| return Map.of("count", entryCount(), "memory", ram.toString(), "memory_in_bytes", ram.getBytes()); | ||
| final Cache.Stats bitsetCacheStats = bitsetCache.stats(); | ||
|
|
||
| final HashMap<String, Object> stats = new LinkedHashMap<>(); |
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.
Nit: Use Map (the interface) as the type here on the LHS, rather than HashMap (the concrete superclass of LinkedHashMap).
|
I realize this is mostly an academic matter, but I'd prefer to split this into two PRs: one that doesn't add time tracking (that is, it only does small bit of additional work that is exposing the things that we're already tracking), and another that adds the time tracking. |
| private final Map<IndexReader.CacheKey, Set<BitsetCacheKey>> keysByIndex; | ||
| private final AtomicLong cacheFullWarningTime; | ||
| private final AtomicLong hitsTimeTakenNanos; | ||
| private final AtomicLong missesTimeTakenNanos; |
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.
https://en.wikipedia.org/wiki/Rectification_of_names -- do not express individuality, make your thing like the other things.
joegallo@simulacron:~/Code/elastic/elasticsearch $ git grep -E '(hitsTime|missesTime)' | grep Nanos | grep 'private final'
modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpCache.java: private final AtomicLong hitsTimeInNanos = new AtomicLong(0);
modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpCache.java: private final AtomicLong missesTimeInNanos = new AtomicLong(0);
x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java: private final AtomicLong hitsTimeInNanos = new AtomicLong(0);
x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java: private final AtomicLong missesTimeInNanos = new AtomicLong(0);
|
I realize you're doing what the rest of the preexisting code is doing by using an Since that's what the existing code does, then that means there's yet another new PR that I'd like you to put in first which will change those over (or we'll figure out together why that's not feasible). |
|
splitting up PRs and taking comments into account 🚀 |
No description provided.