Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c159b5f
Optimize primitive service performance
MikeAlhayek Jul 11, 2026
e6ee346
Optimize MCP prompt aggregation
MikeAlhayek Jul 11, 2026
8a4ac5f
Optimize bounded document context formatting
MikeAlhayek Jul 11, 2026
b6026bf
Optimize cached catalog paging
MikeAlhayek Jul 12, 2026
e78d657
Optimize data extraction field matching
MikeAlhayek Jul 12, 2026
1d675e7
Optimize A2A tool name sanitization
MikeAlhayek Jul 12, 2026
0ae4e82
Optimize Azure AI Search ID filters
MikeAlhayek Jul 12, 2026
90ec550
Reuse OpenXML spreadsheet row storage
MikeAlhayek Jul 12, 2026
667a869
Optimize sentence boundary detection
MikeAlhayek Jul 12, 2026
1b3d5a2
Optimize JSON code fence extraction
MikeAlhayek Jul 12, 2026
d2d5b52
Optimize tool dependency expansion
MikeAlhayek Jul 12, 2026
b3895a9
Optimize MCP capability resolution
MikeAlhayek Jul 12, 2026
a16dabe
Optimize JSON node conversion
MikeAlhayek Jul 12, 2026
6dc445f
Optimize MCP tool merging
MikeAlhayek Jul 12, 2026
4affabf
Optimize YesSql extracted data indexing
MikeAlhayek Jul 12, 2026
8968bbb
Optimize tabular batch splitting
MikeAlhayek Jul 12, 2026
e78e8ed
Benchmark document indexing materialization
MikeAlhayek Jul 12, 2026
c225656
Optimize extracted data snapshot recording
MikeAlhayek Jul 13, 2026
250f153
Benchmark indexing queue normalization
MikeAlhayek Jul 13, 2026
89756e5
Optimize speech text sanitization
MikeAlhayek Jul 13, 2026
4dd886a
Improve PR test failure logging
MikeAlhayek Jul 13, 2026
03de34d
Print PR test failure details
MikeAlhayek Jul 13, 2026
a185f91
Fix cross-platform index formatting test
MikeAlhayek Jul 13, 2026
c18110c
Optimize prompt security normalization
MikeAlhayek Jul 13, 2026
baf5417
Benchmark RAG document text joining
MikeAlhayek Jul 13, 2026
c0d9d12
Optimize post-session message projection
MikeAlhayek Jul 13, 2026
333798a
Optimize extraction name merging
MikeAlhayek Jul 13, 2026
ffbef80
Optimize output security scanning
MikeAlhayek Jul 13, 2026
ebd829f
Optimize response log previews
MikeAlhayek Jul 13, 2026
2d4f0ae
Optimize content title extraction
MikeAlhayek Jul 13, 2026
e10088f
Optimize conversion goal matching
MikeAlhayek Jul 13, 2026
0cb84d1
Optimize delimited artifact construction
MikeAlhayek Jul 13, 2026
7bb42c6
Optimize streamed audio encoding
MikeAlhayek Jul 13, 2026
739b942
Bound completion prompt history
MikeAlhayek Jul 13, 2026
966cd60
Optimize streamed tool arguments
MikeAlhayek Jul 13, 2026
ee72bbc
Bound Azure chat history conversion
MikeAlhayek Jul 13, 2026
860221e
Optimize chat conversation history
MikeAlhayek Jul 13, 2026
5690b72
Optimize Elasticsearch filter tokenization
MikeAlhayek Jul 14, 2026
f922d3b
Optimize completion handler dispatch
MikeAlhayek Jul 14, 2026
737a70d
Optimize security prompt composition
MikeAlhayek Jul 14, 2026
6649ee9
Optimize Word text extraction
MikeAlhayek Jul 14, 2026
17a58a2
Optimize Azure AI Search data source ReadByIds filter
MikeAlhayek Jul 14, 2026
5cced91
Optimize tabular query result formatting
MikeAlhayek Jul 14, 2026
f6f528c
Optimize YesSql extracted data copying
MikeAlhayek Jul 14, 2026
1bbd0b7
Optimize Copilot prompt history composition
MikeAlhayek Jul 14, 2026
2f205a0
Optimize MCP URI and path matching
MikeAlhayek Jul 14, 2026
bda48bd
Optimize OpenXML tabular artifact capacity
MikeAlhayek Jul 14, 2026
e0b7808
Optimize EntityCore chat session I/O
MikeAlhayek Jul 17, 2026
a6f4391
Document citation reference rescan benchmark
MikeAlhayek Jul 17, 2026
e85500d
Optimize Claude prompt tail selection
MikeAlhayek Jul 17, 2026
5551a29
Optimize Azure OpenAI streaming updates
MikeAlhayek Jul 17, 2026
0d7067d
Optimize A2A proxy schema reuse
MikeAlhayek Jul 17, 2026
d3b6cf6
Optimize Elasticsearch source document mapping
MikeAlhayek Jul 17, 2026
30fcfe9
Optimize AI hot-path allocations
MikeAlhayek Jul 17, 2026
9b30cd1
Optimize log sanitization allocations
MikeAlhayek Jul 17, 2026
96c5acb
Merge remote-tracking branch 'origin/main' into ma/optimizations
MikeAlhayek Jul 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ jobs:
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
- name: Unit Tests
run: |
dotnet test -c Release --no-build ./tests/CrestApps.Core.Tests/CrestApps.Core.Tests.csproj
dotnet test -c Release --no-build ./tests/CrestApps.Core.Tests/CrestApps.Core.Tests.csproj
- name: Print Test Failure Details
if: failure()
shell: pwsh
run: |
Get-ChildItem ./tests/CrestApps.Core.Tests/bin/Release/net10.0/TestResults -Filter *.log -Recurse |
ForEach-Object { Get-Content $_.FullName }
4 changes: 4 additions & 0 deletions CrestApps.Core.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<File Path="README.md" />
<File Path="SECURITY.md" />
</Folder>
<Folder Name="/benchmarks/">
<File Path="benchmarks/README.md" />
<Project Path="benchmarks/CrestApps.Core.Benchmarks/CrestApps.Core.Benchmarks.csproj" />
</Folder>
<Folder Name="/src/">
<Project Path="src/CrestApps.Core.Docs/CrestApps.Core.Docs.csproj" />
</Folder>
Expand Down
117 changes: 117 additions & 0 deletions benchmarks/CrestApps.Core.Benchmarks/A2AAgentProxyToolBenchmarks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
using System.Text.Json;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using CrestApps.Core.AI.A2A.Services;

namespace CrestApps.Core.Benchmarks;

/// <summary>
/// Measures A2A proxy tool construction with per-instance versus shared JSON schema parsing.
/// This class must remain unsealed because BenchmarkDotNet generates a derived benchmark type.
/// </summary>
[MemoryDiagnoser]
[SimpleJob(warmupCount: 5, iterationCount: 12)]
public class A2AAgentProxyToolConstructionBenchmarks
{
private const string _jsonSchema =
"""
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The message or task to send to the remote agent for processing."
},
"contextId": {
"type": "string",
"description": "An optional context identifier to maintain conversation continuity with the remote agent."
}
},
"required": ["message"]
}

""";

private int _schemaKindSink;

/// <summary>
/// Gets or sets the number of proxy tools created per benchmark operation.
/// </summary>
[Params(1, 100)]
public int ToolCount { get; set; }

/// <summary>
/// Verifies that the captured schema and production schema remain identical.
/// </summary>
[GlobalSetup]
public void Setup()
{
var legacySchema = JsonElement.Parse(_jsonSchema);
var tool = CreateTool(ToolCount);

if (!string.Equals(
legacySchema.GetRawText(),
tool.JsonSchema.GetRawText(),
StringComparison.Ordinal))
{
throw new InvalidOperationException("Legacy and current A2A proxy schemas differ.");
}
}

/// <summary>
/// Creates proxy tools while parsing the original per-instance schema.
/// </summary>
/// <returns>The last created proxy tool.</returns>
[Benchmark(Baseline = true)]
public object CreateToolsLegacy()
{
A2AAgentProxyTool tool = null;
var schemaKind = 0;

for (var i = 0; i < ToolCount; i++)
{
var schema = JsonElement.Parse(_jsonSchema);
tool = CreateTool(i);
schemaKind += (int)schema.ValueKind;
}

_schemaKindSink = schemaKind;

return tool;
}

/// <summary>
/// Creates proxy tools with the shared production schema.
/// </summary>
/// <returns>The last created proxy tool.</returns>
[Benchmark]
public object CreateToolsCurrent()
{
A2AAgentProxyTool tool = null;
var schemaKind = 0;

for (var i = 0; i < ToolCount; i++)
{
tool = CreateTool(i);
schemaKind += (int)tool.JsonSchema.ValueKind;
}

_schemaKindSink = schemaKind;

return tool;
}

/// <summary>
/// Creates an A2A proxy tool.
/// </summary>
/// <param name="index">The tool index.</param>
/// <returns>The proxy tool.</returns>
private static A2AAgentProxyTool CreateTool(int index)
{
return new A2AAgentProxyTool(
$"agent-{index}",
"Handles a benchmark task.",
"https://agent.example",
$"connection-{index}");
}
}
Loading
Loading