You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to filter functions based on their return value (instead of arguments).
Apart from the XProf-flavoured match-spec takes an additional parameter RetMatchFun which matches the value returned by the function. The call latency
is only measured if there is a match.
RetMatchFun receives the value returned by the traced function as a single
argument and can return:
false: no match, don't measure
true: match, measure and capture the original return value.
{true, NewValue}: match, measure and capture NewValue instead of the original return value.
If RetMatchFun is arity-2 it could match on an exception (class and reason). Should an arity-1 RetMatchFun match on exceptions of form {Class, Reason} too?
We can think of some shortcuts eg. as a convenience function_clause could mean no match (don't have to handle all return values, only the positive case, as in the second example below)
It would be useful if the graph would show both a total count (number of
return_trace messages) and matched count (only when matchfun matches) to see a
rate how oftern thr return value matches.
The text was updated successfully, but these errors were encountered:
Allow to filter functions based on their return value (instead of arguments).
Apart from the XProf-flavoured match-spec takes an additional parameter
RetMatchFun
which matches the value returned by the function. The call latencyis only measured if there is a match.
RetMatchFun
receives the value returned by the traced function as a singleargument and can return:
false
: no match, don't measuretrue
: match, measure and capture the original return value.{true, NewValue}
: match, measure and captureNewValue
instead of the original return value.If
RetMatchFun
is arity-2 it could match on an exception (class and reason). Should an arity-1RetMatchFun
match on exceptions of form{Class, Reason}
too?We can think of some shortcuts eg. as a convenience
function_clause
could mean no match (don't have to handle all return values, only the positive case, as in the second example below)Query example (suggestion):
It would be useful if the graph would show both a total count (number of
return_trace messages) and matched count (only when matchfun matches) to see a
rate how oftern thr return value matches.
The text was updated successfully, but these errors were encountered: