Lines Matching full:rule

24 … \tRelationship rule description: \'{5}\'".format(self.metric, self.collectedValue, self.workloads,
62 # vars for Rule Generator
63 self.pctgmetrics = set() # Percentage rule
250 def relationship_test(self, rule: dict):
252 Validate if the metrics follow the required relationship in the rule.
254 One rule is counted as ont test.
257 @param rule: dict with metric name(+alias), formula, and required upper and lower bounds.
260 for m in rule['Metrics']:
263rule['RangeLower'], rule['RangeUpper'], rule['ErrorThreshold'], alias, ridx=rule['RuleIndex'])
265 rule['Formula'], alias, ridx=rule['RuleIndex'])
267 lb = rule['RangeLower']
268 ub = rule['RangeUpper']
277 …self.errlist.append(TestError([m['Name'] for m in rule['Metrics']], self.workloads[self.wlidx], [],
278 lb, ub, rule['Description']))
280 …self.errlist.append(TestError([m['Name'] for m in rule['Metrics']], self.workloads[self.wlidx], [v…
281 lb, ub, rule['Description']))
289 def single_test(self, rule: dict):
294 One rule may include one or more metrics.
298 @param rule: dict with metrics to validate and the value range requirement
301 rule['RangeLower'], rule['RangeUpper'], rule['ErrorThreshold'])
302 metrics = rule['Metrics']
333rule['RangeLower'], rule['RangeUpper']) for name, val in failures.items()])
350 Check if the rule uses metric(s) that not exist in current platform.
352 @param metric_list: list of metrics from the rule.
353 @return: False when find one metric out in Metric file. (This rule should not skipped.)
354 True when all metrics used in the rule are found in Metric file.
403 for rule in self.rules:
404 if rule["TestType"] == "RelationshipTest":
405 metrics = [m["Name"] for m in rule["Metrics"]]
407 collectlist[rule["RuleIndex"]] = [
430 # Start of Rule Generator
458 for rule in rules:
460 for m in rule["Metrics"]:
465 new_rules.append(rule)
472 2) SingleMetric rule for all the 'percent' metrics
502 # End of Rule Generator
527 … This function loads the validation rule JSON file and Standard Metric file to create rules for
531 … In the test process, it passes through each rule and launch correct test function bases on the
532 'TestType' field of the rule.
573 "-rule", help="Base validation rule file", required=True)
587 validator = Validator(args.rule, reportf, debug=args.debug,