Files
codeql/python/ql/src/Metrics/FunctionNumberOfCalls.ql
Taus 24a29f46be Python: Fix all metrics-related compilation failures
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.
2025-11-26 21:28:51 +00:00

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