Add performance instrumentation to key methods#689
Merged
Conversation
- Add timing metrics to check_pool loop for monitoring cycle duration - Add performance metrics to purge methods (pending, ready, completed queues) - Performance metrics track operation duration using vmpooler_performance gauge - Add warning logs for operations exceeding 5 second threshold in check_pool - All existing metrics (clone, destroy) already have timing instrumentation - Tests passing: 866 examples, 0 failures
…lining - Add in-memory cache for /status endpoint with 30s TTL - Cache keyed by view parameters to handle different query patterns - Add cache clearing for tests to prevent interference - Optimize get_queue_metrics to use single pipeline for all Redis calls - Previously made 7+ separate pipeline calls - Now combines all queue metrics into one pipeline (7n+2 operations) - Reduces Redis round trips and improves API response time - Update unit tests to match new pipelining behavior - All 866 tests passing
Class variables are needed here because: - Cache must be shared across all Sinatra app instances - Class instance variables don't work in Sinatra's dynamic instantiation model - This is a valid use case for class variables despite RuboCop warning
mahikalra
approved these changes
Dec 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.