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: cache recent prometheus queries in memory #1643

Merged
merged 5 commits into from
Feb 21, 2025

Conversation

daniellacosse
Copy link
Contributor

No description provided.

@github-actions github-actions bot added size/S and removed size/XS labels Feb 21, 2025
@github-actions github-actions bot added size/XS and removed size/S labels Feb 21, 2025
@daniellacosse daniellacosse changed the title [DO NOT MERGE] prometheus query timer feat: cache recent prometheus queries Feb 21, 2025
@daniellacosse daniellacosse marked this pull request as ready for review February 21, 2025 21:45

const result = await (target[prop] as Function)(query, ...args);

this.prometheusCache.set(cacheId, {timestamp: Date.now(), result});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can also consider writing temp files to disk

@daniellacosse daniellacosse changed the title feat: cache recent prometheus queries feat: cache recent prometheus queries in memory Feb 21, 2025
@daniellacosse daniellacosse merged commit d262f52 into master Feb 21, 2025
12 of 13 checks passed
@daniellacosse daniellacosse deleted the daniellacosse/prometheus-query-timer branch February 21, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants