Recommended ways to track cache/request statistics?
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: 4.0
**Integration libraries**: OkHttp3
**Issue details / Repro steps / Use case background**: One neat feature of Picasso is that it has a cache snapshots + statistics API that allows you to gather and report statistics however you want. It would be great to get some similar information from Glide (so I guess this is part question, possibly feature request). Looking for some suggestions/guidance on how this could be done today.
Some references:
- [Stats.java](https://github.com/square/picasso/blob/303366b749b2b58ea3a1561ff64e093941ebfbbd/picasso/src/main/java/com/squareup/picasso/Stats.java) (which gets callbacks for various stats)
- [StatsSnapshot.java](https://github.com/square/picasso/blob/master/picasso/src/main/java/com/squareup/picasso/StatsSnapshot.java) (surfaces a snapshot of stats upon request)
Some good use cases of this are for signal in crash reporting, general production stats, debugging (such as showing in a debug drawer, like the [u2020 app](https://github.com/JakeWharton/u2020/blob/master/app/src/internalDebug/java/com/jakewharton/u2020/ui/debug/DebugView.java#L466-L480) demonstrates), performance tracking, etc.
Contributor guide
Assessment
This issue has not been assessed yet.