Files
codeql/python/ql/src/Metrics/FunctionNumberOfCalls.ql
2020-03-30 11:59:10 +02:00

15 lines
328 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