JanusGraph / JanusGraph/janusgraph
Provide db cache metrics
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Having db cache in place it would be great to know how much memory is used for it.
The used guava cache already provide [CacheStats](https://google.github.io/guava/releases/17.0/api/docs/com/google/common/cache/CacheStats.html)
This stats provide nice information, how useful there are for janus graph needs to be clarified.
For us the most important metric would be how much memory is currently consumed.
Unfortunately this is not part of `CacheStats` since such operations are always slow. It could be done using
[Cache#asMap()](https://google.github.io/guava/releases/17.0/api/docs/com/google/common/cache/Cache.html#asMap()) serialised it and take the size.
This would as well use much memory, but for a management function having warning on it might be ok. (Similar to old ehcache cache statistics)
Contributor guide
Research direction
The issue points to Guava's Cache and CacheStats APIs; start by locating JanusGraph's database-cache implementation and its existing metrics entry point. Determine which cache statistics are relevant and whether a memory-size measurement is acceptable for a management metric. The issue does not define the final metrics or completion criteria, so maintainer clarification is needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100