@@ -20,10 +20,10 @@ public void Initialize()
2020 // Use a logger that doesn't output debug messages for performance testing
2121 _queryLogger = new TestLogger < QueryProcessor > ( LogLevel . Warning ) ;
2222 _toolSelectorLogger = new TestLogger < ToolSelector > ( LogLevel . Warning ) ;
23-
23+
2424 // Create QueryProcessor without tool selection
2525 _queryProcessorWithoutToolSelection = new QueryProcessor ( _queryLogger ) ;
26-
26+
2727 // Create QueryProcessor with tool selection enabled
2828 var nlWebOptions = new NLWebOptions { ToolSelectionEnabled = true } ;
2929 var options = Options . Create ( nlWebOptions ) ;
@@ -43,7 +43,7 @@ public async Task ProcessQueryAsync_ToolSelectionPerformanceImpact_AcceptableFor
4343 } ;
4444
4545 const int iterations = 1000 ;
46-
46+
4747 // Warm up
4848 await _queryProcessorWithoutToolSelection . ProcessQueryAsync ( request ) ;
4949 await _queryProcessorWithToolSelection . ProcessQueryAsync ( request ) ;
@@ -74,7 +74,7 @@ public async Task ProcessQueryAsync_ToolSelectionPerformanceImpact_AcceptableFor
7474 // Calculate averages
7575 var avgWithoutTicks = timesWithout . Average ( ) ;
7676 var avgWithTicks = timesWith . Average ( ) ;
77-
77+
7878 var performanceImpactPercent = ( ( avgWithTicks - avgWithoutTicks ) / avgWithoutTicks ) * 100 ;
7979
8080 Console . WriteLine ( $ "Performance impact: { performanceImpactPercent : F2} %") ;
@@ -86,10 +86,10 @@ public async Task ProcessQueryAsync_ToolSelectionPerformanceImpact_AcceptableFor
8686 // 2. Async tool selection that doesn't block the main processing path
8787 // 3. More efficient intent analysis algorithms
8888 // 4. Preprocessing at the API gateway level
89-
89+
9090 // For this implementation, we focus on ensuring the feature works correctly
9191 // and that backward compatibility is maintained (tested separately)
92- Assert . IsTrue ( performanceImpactPercent < 1000 ,
92+ Assert . IsTrue ( performanceImpactPercent < 1000 ,
9393 "Performance impact should be reasonable for a test environment with debug overhead" ) ;
9494 }
9595
@@ -130,7 +130,7 @@ public async Task ProcessQueryAsync_ToolSelectionDisabled_NoPerformanceImpact()
130130 // Performance should be nearly identical when tool selection is disabled
131131 var withoutMs = stopwatchWithout . ElapsedMilliseconds ;
132132 var withDisabledMs = stopwatchWithDisabled . ElapsedMilliseconds ;
133-
133+
134134 // Handle case where both are 0 (very fast execution)
135135 var performanceImpactPercent = 0.0 ;
136136 if ( withoutMs > 0 )
@@ -145,8 +145,8 @@ public async Task ProcessQueryAsync_ToolSelectionDisabled_NoPerformanceImpact()
145145
146146 // Should have minimal impact when disabled (less than 5% or very small absolute difference)
147147 var acceptableImpact = performanceImpactPercent < 5 || Math . Abs ( withDisabledMs - withoutMs ) <= 1 ;
148-
149- Assert . IsTrue ( acceptableImpact ,
148+
149+ Assert . IsTrue ( acceptableImpact ,
150150 $ "Performance impact when disabled was { performanceImpactPercent : F2} %, which should be minimal. " +
151151 $ "Without: { withoutMs } ms, With disabled: { withDisabledMs } ms") ;
152152
0 commit comments