Files
codeql/python/ql/src/Metrics/FunctionNumberOfCalls.ql
2018-11-19 15:10:42 +00:00

17 lines
330 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
from FunctionMetrics func
select func, func.getNumberOfCalls() as n
order by n desc