One of metrics we use is Resource Standard Metrics or RSM https://msquaredtechnologies.com/Resource-Standard-Metrics.html
When we run RSM metrics report it produces very detailed analysis report per each C# file(!) including different numbers counted even from inside functions and at the end of the report it has aggregates: total/min/max/average. Here is an example of output for one .cs file(actually it's .csv file which is readable by excel), there are approximately 1000+ files in the scope of the build.
Here it is:
Type, Name, File Date, Size, LOC/FP, eLOC/FP, lLOC/FP, Comments, Blanks, Lines, Comment/eLOC, Classes, Functions, Parameters, Returns, InterComp, CycloComp, Total Complexity, Notices
File, src\ABCStructuredStorage\ComInterfaces.cs, 08/18/18 09:22:24, 9297, 140/2.6 , 124/2.3 , 53/1.0 , 18, 24, 177, 0.15, 2, 0, 0, 0, 0, 0, 0, 72
f(), ABCStructuredStorage.ABCStorage.ABCStorage, , , 8/0.2 , 4/0.1 , 3/0.1 , 0, 0, 8, 0.00, , 1, 2, 1, 3, 2, 5,
f(), ABCStructuredStorage.ABCStorage.ABCStorage, , , 2/0.0 , 0/0.0 , 0/0.0 , 0, 0, 2, 0.00, , 1, 1, 1, 2, 1, 3,
f(), ABCStructuredStorage.ABCStorage.Dispose, , , 8/0.2 , 4/0.1 , 3/0.1 , 0, 0, 8, 0.00, , 1, 0, 1, 1, 2, 3,
f(), ABCStructuredStorage.ABCStorage.CreateStorage, , , 9/0.2 , 5/0.1 , 4/0.1 , 1, 0, 10, 0.20, , 1, 1, 1, 2, 2, 4,
f(), ABCStructuredStorage.ABCStorage.CreateStorage, , , 10/0.2 , 6/0.1 , 5/0.1 , 1, 0, 11, 0.17, , 1, 2, 1, 3, 3, 6,
f(), ABCStructuredStorage.ABCStorage.CreateStream, , , 9/0.2 , 5/0.1 , 4/0.1 , 0, 0, 9, 0.00, , 1, 1, 1, 2, 2, 4,
f(), ABCStructuredStorage.ABCStorage.CreateStream, , , 6/0.1 , 4/0.1 , 4/0.1 , 0, 0, 6, 0.00, , 1, 3, 1, 4, 1, 5,
f(), ABCStructuredStorage.ABCStorage.OpenStorage, , , 13/0.2 , 7/0.1 , 5/0.1 , 0, 1, 14, 0.00, , 1, 2, 2, 4, 3, 7,
f(), ABCStructuredStorage.ABCStorage.OpenStorage, , , 3/0.1 , 1/0.0 , 1/0.0 , 0, 0, 3, 0.00, , 1, 1, 1, 2, 1, 3,
f(), ABCStructuredStorage.ABCStorage.OpenStream, , , 5/0.1 , 3/0.1 , 3/0.1 , 2, 1, 8, 0.67, , 1, 1, 1, 2, 1, 3,
f(), ABCStructuredStorage.ABCStorage.Exists, , , 14/0.3 , 8/0.2 , 6/0.1 , 0, 0, 14, 0.00, , 1, 2, 2, 4, 4, 8,
f(), ABCStructuredStorage.ABCStorage.StorageExists, , , 3/0.1 , 1/0.0 , 1/0.0 , 0, 0, 3, 0.00, , 1, 1, 1, 2, 1, 3,
f(), ABCStructuredStorage.ABCStorage.StreamExists, , , 3/0.1 , 1/0.0 , 1/0.0 , 0, 0, 3, 0.00, , 1, 1, 1, 2, 1, 3,
, Total, , , 93/1.8 , 49/0.9 , 40/0.8 , 4, 2, 99, 1.03, , 13, 18, 15, 33, 24, 57,
, Average, , , 7.15/0.2 , 3.77/0.1 , 3.08/0.1 , 0.31, 0.15, 7.62, 0.08, , 1.00, 1.38, 1.15, 2.54, 1.85, 4.38,
, Maximum, , , 14/0.3 , 8/0.2 , 6/0.1 , 2, 1, 14, 0.67, , 1, 3, 2, 4, 4, 8,
, Minimum, , , 2/0.0 , 0/0.0 , 0/0.0 , 0, 0, 2, 0.00, , 1, 0, 1, 1, 1, 3,