Patent attributes
Some embodiments provide a method for identifying runtime complexity of a policy. The method receives, through a user interface (UI), a set of code defining a particular policy. For each variable in the particular policy, the method identifies a first occurrence of the variable in the particular policy to determine a number of values assigned to the variable. Variables determined to be assigned one value are separated from variables determined to be assigned more than one value. Based on the determinations for each variable, the method calculates a set of metrics that include at least time complexity, size complexity, and count complexity for the particular policy. The method then displays, through the UI, the calculated set of metrics along with a set of one or more suggestions for optimizing the particular policy based on the calculated set of metrics.