Skip to content

Commit

Permalink
filterx: store "name" attribute extra granularity in metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Jan 4, 2025
1 parent db11323 commit e164559
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/filterx/expr-getattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ filterx_getattr_new(FilterXExpr *operand, FilterXString *attr_name)
self->operand = operand;

self->attr = (FilterXObject *) attr_name;

/* NOTE: name borrows the string value from the string object */
self->super.name = filterx_string_get_value_ref(self->attr, NULL);
return &self->super;
}
2 changes: 2 additions & 0 deletions lib/filterx/expr-setattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ filterx_nullv_setattr_new(FilterXExpr *object, FilterXString *attr_name, FilterX

self->new_value = new_value;
self->super.ignore_falsy_result = TRUE;
/* NOTE: name borrows the string value from the string object */
self->super.name = filterx_string_get_value_ref(self->attr, NULL);
return &self->super;
}

Expand Down
3 changes: 3 additions & 0 deletions lib/filterx/expr-variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ filterx_variable_expr_new(FilterXString *name, FilterXVariableType type)
self->variable_name = (FilterXObject *) name;
self->handle = filterx_map_varname_to_handle(filterx_string_get_value_ref(self->variable_name, NULL), type);

/* NOTE: name borrows the string value from the string object */
self->super.name = filterx_string_get_value_ref(self->variable_name, NULL);

return &self->super;
}

Expand Down

0 comments on commit e164559

Please sign in to comment.