mirror of
https://github.com/github/codeql.git
synced 2026-02-13 21:51:29 +01:00
In hindsight, having a `.getMetrics()` method that just returns `this` is somewhat weird. It's possible that it predates the existence of the inline cast, however.
16 lines
358 B
Plaintext
16 lines
358 B
Plaintext
/**
|
|
* @name Number of calls
|
|
* @description The total number of calls in a function.
|
|
* @kind treemap
|
|
* @id py/number-of-calls-per-function
|
|
* @treemap.warnOn highValues
|
|
* @metricType callable
|
|
* @metricAggregate avg max
|
|
*/
|
|
|
|
import python
|
|
private import LegacyPointsTo
|
|
|
|
from FunctionMetrics func
|
|
select func, func.getNumberOfCalls() as n order by n desc
|