Token benchmark
Generated by benchmarks/RoslynLens.TokenBenchmark. For every
single-type source file, it compares the full file (what an agent pays to
read when it opens the file) against the JSON returned by the real
get_public_api tool. Both sides are counted with the GPT-4o
(o200k_base) tokenizer whose vocabulary ships embedded in the package,
so the run is offline and reproducible.
- Solution:
RoslynLens.slnx - Types compared: 94 (skipped 74 unresolved/empty)
- Median reduction: 73.1 %
- Pooled reduction (size-weighted): 77.4 %
- Total tokens: 68,795 source -> 15,565 lens
Largest 20 types by source size
| Type | Source tokens | Lens tokens | Reduction |
|---|---|---|---|
ValidateGranitConventionsTool |
2,690 | 76 | 97.2 % |
ComplexityAnalyzerTests |
2,640 | 1,208 | 54.2 % |
SymbolResolver |
2,461 | 596 | 75.8 % |
FindDeadCodeTool |
2,129 | 80 | 96.2 % |
FindSurprisingDependenciesTool |
2,036 | 70 | 96.6 % |
WorkspaceManager |
1,905 | 510 | 73.2 % |
GetCommunitiesTool |
1,653 | 70 | 95.8 % |
GetModuleDependsOnTool |
1,572 | 74 | 95.3 % |
SolutionDiscoveryTests |
1,529 | 696 | 54.5 % |
TypeStructureHelperTests |
1,510 | 454 | 69.9 % |
SymbolResolverTests |
1,441 | 493 | 65.8 % |
DetectCircularDependenciesTool |
1,421 | 70 | 95.1 % |
GetTypeOverviewTool |
1,325 | 66 | 95.0 % |
FindIsolatedSymbolsTool |
1,297 | 72 | 94.4 % |
GetComplexityMetricsTool |
1,291 | 76 | 94.1 % |
HardcodedSecretDetectorTests |
1,240 | 525 | 57.7 % |
GetTestCoverageMapTool |
1,163 | 70 | 94.0 % |
FindGodNodesTool |
1,124 | 74 | 93.4 % |
GetDiagnosticsTool |
1,119 | 68 | 93.9 % |
HardcodedSecretDetector |
1,052 | 120 | 88.6 % |