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

feat: instrument the cache layer #942

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Oct 30, 2023

🧿 Current issues / What's wrong ?

We have no insight about the performance of the cache layer.

💊 Fixes / Solution

Fix #940

Instrument all requests going through the cache layer, categorized by cache status

🚧 Changes

Each return of the cache functions is instrumented.

Various cache status are:

  • HIT: Cache found and served
  • MISS: Cache not found, will be cached
  • SKIP: Will not cache
  • UNQUALIFIED: Can not be cached because data is not final

🛠️ Tests

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (7fc6d72) 71.15% compared to head (8c2d6c1) 72.27%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #942      +/-   ##
==========================================
+ Coverage   71.15%   72.27%   +1.11%     
==========================================
  Files          11       12       +1     
  Lines         638      689      +51     
  Branches      101      108       +7     
==========================================
+ Hits          454      498      +44     
- Misses        180      188       +8     
+ Partials        4        3       -1     
Files Coverage Δ
src/methods.ts 100.00% <100.00%> (ø)
src/metrics.ts 63.15% <100.00%> (+6.90%) ⬆️
src/scores.ts 84.09% <58.82%> (-15.91%) ⬇️
src/redis.ts 71.42% <11.11%> (+71.42%) ⬆️
src/helpers/cache.ts 73.13% <73.13%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wa0x6e wa0x6e requested a review from ChaituVR October 30, 2023 11:00
@wa0x6e wa0x6e changed the base branch from master to move-getscore-to-cache-engine October 30, 2023 11:00
@wa0x6e wa0x6e added this to the Add more metrics milestone Oct 30, 2023
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

utAck

@wa0x6e wa0x6e merged commit b78d40d into move-getscore-to-cache-engine Nov 6, 2023
4 checks passed
@wa0x6e wa0x6e deleted the instrument-cache branch November 6, 2023 07:13
wa0x6e added a commit that referenced this pull request Nov 6, 2023
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.

2 participants