Skip to main content
.NETStandard2.0

A Metalama extension that exposes code metrics to the code model.

Published
Oct 2, 2024
2y ago
Total Downloads
87.0K
86,992

Install

dotnet add package Metalama.Extensions.Metrics --version 2024.2.25
ProductVersions
.NET Standard
netstandard2.0

README

The Metalama.Extensions.Metrics package implements a few metrics that can be consumed from Metalama aspects and fabrics.

Currently, the following metrics are implemented:

  • StatementNumber: counts the number of statements.
  • SyntaxNodeNumber: counts the number of Roslyn syntax node.

To use a metric in an aspect, use for instance:

method.Metrics().Get<StatementNumber>().Value

Changes from Previous Version

No structural changes between v2024.2.24 and v2024.2.25.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.