Lines Matching full:formula
206 def evaluate_formula(self, formula: str, alias: dict, ridx: int = 0):
208 Evaluate the value of formula.
210 @param formula: the formula to be evaluated
212 @returns: value of the formula is success; -1 if the one or more metric value not provided
221 for i in range(len(formula)):
222 if i+1 == len(formula) or formula[i] in ('+', '-', '*', '/'):
223 s = alias[formula[b:i]] if i + \
224 1 < len(formula) else alias[formula[b:]]
238 if i + 1 < len(formula):
239 sign = formula[i]
253 eg. lower_bound <= eval(formula)<= upper_bound
255 …Failure: when one or more metric result(s) not provided, or when formula evaluated outside of uppe…
257 @param rule: dict with metric name(+alias), formula, and required upper and lower bounds.
265 rule['Formula'], alias, ridx=rule['RuleIndex'])