Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c023808

Browse files
committed
C#: Telemetry query for measuring all library usage.
1 parent 0650c6d commit c023808

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @name External libraries
3+
* @description A list of external libraries used in the code
4+
* @kind metric
5+
* @tags summary
6+
* @id csharp/telemetry/external-libs
7+
*/
8+
9+
import csharp
10+
import ExternalAPI
11+
12+
from int usages, string info
13+
where
14+
usages =
15+
strictcount(Call c, ExternalAPI api |
16+
c.getTarget() = api and
17+
api.getInfoPrefix() = info and
18+
not api.isUninteresting()
19+
)
20+
select info, usages order by usages desc

0 commit comments

Comments
 (0)