Skip to content

C#: Add telemetry query to report extractor information #15124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tamasvajk
Copy link
Contributor

@tamasvajk tamasvajk commented Dec 15, 2023

Sample results:

Key Value
Number of files 2,020
Total number of lines 173,864
Number of lines of code 126,920
Number of files with extension config 1
Number of files with extension cs 1,562
Number of files with extension props 32
Number of files with extension dll 394
Number of files with extension csproj 30
Number of diagnostics with severity 0 7,303
Number of diagnostics with severity 2 12,611
Number of diagnostics with severity 3 762
Total number of lines with extension config 11
Total number of lines with extension cs 171,160
Total number of lines with extension props 1,315
Total number of lines with extension csproj 1,378
Number of lines of code with extension config 11
Number of lines of code with extension cs 124,216
Number of lines of code with extension props 1,315
Number of lines of code with extension csproj 1,378
Number of calls with call target 84,286
Number of calls with missing call target 1,691
Percentage of calls with call target 98.033
Number of compiler reported ambiguity errors 729
Number of compiler reported ambiguity error messages 310
Number of access with target 142,087
Number of expressions with known type 563,842
Number of expressions with unknown type 637
Number of type mentions with known type 116,315
Number of type mentions with unknown type 2,272
Is buildless extraction 1
Percentage of access with target 98.435
Percentage of expressions with known type 99.887
Percentage of type mentions with known type 98.084
Number of access with missing target 2,259

@github-actions github-actions bot added the C# label Dec 15, 2023
@tamasvajk tamasvajk marked this pull request as ready for review December 15, 2023 15:30
@tamasvajk tamasvajk requested a review from a team as a code owner December 15, 2023 15:30
@tamasvajk tamasvajk added the no-change-note-required This PR does not need a change note label Dec 15, 2023
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Should we also have something that counts UnknownExprs?

@tamasvajk
Copy link
Contributor Author

LGTM. Should we also have something that counts UnknownExprs?

UnknownExpr is private. Should I count @unknown_expr directly?

@hvitved
Copy link
Contributor

hvitved commented Dec 18, 2023

UnknownExpr is private. Should I count @unknown_expr directly?

Yes.

}

module ExprStats implements StatsSig {
int getNumberOfOk() { result = count(Expr e | not e instanceof @unknown_expr) }

Check warning

Code scanning / CodeQL

Use of database type outside the language core

Database type used outside the language lib/ folder.
module ExprStats implements StatsSig {
int getNumberOfOk() { result = count(Expr e | not e instanceof @unknown_expr) }

int getNumberOfNotOk() { result = count(Expr e | e instanceof @unknown_expr) }

Check warning

Code scanning / CodeQL

Use of database type outside the language core

Database type used outside the language lib/ folder.
Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamasvajk : This will be really helpful!!

Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tamasvajk tamasvajk merged commit d5f47a3 into github:main Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants