Skip to content

Conversation

@tobias-tengler
Copy link
Member

@tobias-tengler tobias-tengler commented Oct 24, 2025

I removed this in #8793 after discussion with Michael, since there weren't any usages.

Turns out Nitro is still using it, so I'm re-adding a slightly modified and less bulky version of it. With tests, since it didn't have any before...

Copilot AI review requested due to automatic review settings October 24, 2025 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR re-adds the IRequestExecutorOptionsMonitor interface as a synchronous abstraction layer over the existing IOptionsMonitor<RequestExecutorSetup>, needed for Nitro. The implementation includes a default adapter and comprehensive test coverage.

Key Changes:

  • Introduces IRequestExecutorOptionsMonitor interface with Get and OnChange methods
  • Adds DefaultRequestExecutorOptionsMonitor as an adapter around IOptionsMonitor<RequestExecutorSetup>
  • Replaces direct IOptionsMonitor<RequestExecutorSetup> usage with the new abstraction throughout the codebase

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IRequestExecutorOptionsMonitor.cs Defines the new monitor interface for RequestExecutorSetup change notifications
DefaultRequestExecutorOptionsMonitor.cs Implements the default monitor that wraps IOptionsMonitor
InternalServiceCollectionExtensions.cs Registers the default monitor implementation in DI
RequestExecutorManager.cs Updated to use IRequestExecutorOptionsMonitor and subscribe to changes
RequestExecutorBuilderExtensions.Caches.cs Updated to use the new monitor interface
RequestExecutorWarmupService.cs Updated to use the new monitor interface
RequestExecutorOptionsMonitorTests.cs Comprehensive tests for the monitor functionality
IConfigureRequestExecutorSetup.cs Removed unused interface
ConfigureRequestExecutorSetup.cs Removed unused implementation
RequestExecutorServiceCollectionExtensions.cs Added call to register the monitor

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

🚀 Performance Test Results

📊 Response Time

Current

Test Min Med Max Avg P90 P95 P99
Single Fetch 1.36ms 1.91ms 41.73ms 2.22ms 3.17ms 3.87ms 6.56ms
DataLoader 2.65ms 3.63ms 21.67ms 4.05ms 5.66ms 7.04ms 10.08ms

Baseline

Test Min Med Max Avg P90 P95 P99
Single Fetch 1.31ms 1.76ms 50.86ms 1.97ms 2.54ms 2.95ms 5.40ms
DataLoader 2.58ms 3.40ms 19.09ms 3.78ms 5.15ms 6.32ms 8.87ms

Change vs Baseline

Test Min Med Max Avg P90 P95 P99
Single Fetch ✅ (3.67% worse) ⚠️ (8.35% worse) 🎉 (17.94% better) ⚠️ (12.85% worse) ⚠️ (24.59% worse) ⚠️ (30.89% worse) ⚠️ (21.53% worse)
DataLoader ✅ (2.55% worse) ⚠️ (6.85% worse) ⚠️ (13.51% worse) ⚠️ (7.28% worse) ⚠️ (10.05% worse) ⚠️ (11.38% worse) ⚠️ (13.71% worse)

⚡ Throughput

Test Metric Current Baseline Change
Single Fetch Requests/sec 78.79 req/s 78.79 req/s ✅ (0.00% better)
DataLoader Requests/sec 78.57 req/s 78.61 req/s ✅ (0.06% better)

🎯 Reliability

Test Error Rate
Single Fetch 0.00% ✅
DataLoader 0.00% ✅

🔍 Analysis

⚠️ Performance regression detected. Response times have increased significantly compared to baseline.


Run 18783770312 • Commit ae85bcf • Fri, 24 Oct 2025 15:09:58 GMT

@tobias-tengler tobias-tengler force-pushed the tte/re-add-executor-options-monitor branch from 7589f3d to d004eda Compare October 24, 2025 15:11
@tobias-tengler tobias-tengler changed the title Re-add IRequestExecutorOptionsMonitor with tests Re-add IRequestExecutorOptionsMonitor Oct 24, 2025
@github-actions
Copy link
Contributor

🚀 Performance Test Results

📊 Response Time

Current

Test Min Med Max Avg P90 P95 P99
Single Fetch 1.30ms 1.68ms 45.72ms 1.86ms 2.35ms 2.74ms 5.10ms
DataLoader 2.56ms 3.14ms 14.60ms 3.47ms 4.54ms 5.61ms 8.03ms

Baseline

Test Min Med Max Avg P90 P95 P99
Single Fetch 1.31ms 1.76ms 50.86ms 1.97ms 2.54ms 2.95ms 5.40ms
DataLoader 2.58ms 3.40ms 19.09ms 3.78ms 5.15ms 6.32ms 8.87ms

Change vs Baseline

Test Min Med Max Avg P90 P95 P99
Single Fetch ✅ (0.84% better) ✅ (4.88% better) 🎉 (10.09% better) 🎉 (5.51% better) 🎉 (7.68% better) 🎉 (7.28% better) 🎉 (5.61% better)
DataLoader ✅ (0.99% better) 🎉 (7.52% better) 🎉 (23.50% better) 🎉 (8.08% better) 🎉 (11.75% better) 🎉 (11.18% better) 🎉 (9.38% better)

⚡ Throughput

Test Metric Current Baseline Change
Single Fetch Requests/sec 78.81 req/s 78.79 req/s ✅ (0.03% worse)
DataLoader Requests/sec 78.60 req/s 78.61 req/s ✅ (0.01% better)

🎯 Reliability

Test Error Rate
Single Fetch 0.00% ✅
DataLoader 0.00% ✅

🔍 Analysis

✅ No significant performance regression detected


Run 18783983367 • Commit 5d9c2fe • Fri, 24 Oct 2025 15:17:28 GMT

@tobias-tengler tobias-tengler marked this pull request as draft October 24, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants