Lines Matching refs:expression

11   """Abstract base class of elements in a metric expression."""
29 def Substitute(self, name: str, expression: 'Expression') -> 'Expression':
85 """Used to ensure that the nodes in the expression tree are all Expression."""
94 # brackets. Precedence matches that of the simple expression parser
96 # the bitwise &, ^, | but not the logical versions that the expression
198 def Substitute(self, name: str, expression: Expression) -> Expression:
199 if self.Equals(expression):
201 lhs = self.lhs.Substitute(name, expression)
204 rhs = self.rhs.Substitute(name, expression)
246 def Substitute(self, name: str, expression: Expression) -> Expression:
247 if self.Equals(expression):
249 true_val = self.true_val.Substitute(name, expression)
250 cond = self.cond.Substitute(name, expression)
251 false_val = self.false_val.Substitute(name, expression)
256 """A function in an expression like min, max, d_ratio."""
296 def Substitute(self, name: str, expression: Expression) -> Expression:
297 if self.Equals(expression):
299 lhs = self.lhs.Substitute(name, expression)
302 rhs = self.rhs.Substitute(name, expression)
312 """An event in an expression."""
331 def Substitute(self, name: str, expression: Expression) -> Expression:
336 """A constant within the expression tree."""
358 def Substitute(self, name: str, expression: Expression) -> Expression:
363 """A runtime literal within the expression tree."""
380 def Substitute(self, name: str, expression: Expression) -> Expression:
532 """A simple json metric expression decoder.
534 Converts a json encoded metric expression by way of python's ast and
568 raise SyntaxError(f'Parsing expression:\n{orig}') from e
581 Dict: mapping from a pmu, metric name pair to a shortened expression.