Complexity Analyzers

•
6
•

Analyzes C# code to estimate Big-O algorithmic complexity, detect costly anti-patterns, and calculate structural code metrics across IDEs, CI pipelines, and AI assistants.

Complexity Analyzers is a comprehensive static analysis toolkit for C# that calculates algorithmic Big-O complexity and measures essential code metrics without introducing runtime overhead. Combining a compile-time Roslyn analyzer, a .NET CLI, a GitHub Action, and an MCP server, it flags performance bottlenecks such as linear lookups and collection materializations inside loops. Built on conservative semantic analysis, the suite solves recursive recurrences, models known BCL and LINQ calls, and computes structural metrics like Cyclomatic and Cognitive Complexity to help engineering teams and AI agents prevent performance regressions and enforce strict quality gates.

주요 기능

015 GitHub stars
02Calculates Cyclomatic Complexity, Cognitive Complexity, nesting depth, NLOC, and parameter counts
03Estimates Big-O algorithmic complexity for supported C# methods and resolved BCL/LINQ operations
04Detects costly code patterns inside iteration such as linear lookups, materialization, and ordering
05Solves direct-recursion recurrence families including exponential growth and Master Theorem forms
06Exposes a local, read-only MCP server enabling AI coding assistants to evaluate method complexity and quality

사용 사례

01Enforcing complexity and code-size thresholds in CI/CD pipelines to prevent software regressions
02Empowering AI code generation and review tools to verify algorithmic efficiency using Model Context Protocol
03Catching performance bottlenecks and expensive iterations directly in the IDE or via build diagnostics