Skip to content

Add custom naming to decorator #71

Description

@MasonEgger

It would be nice if we could specify an optional metric name through the decorators instead of getting <FUNCTION_NAME>_calls.

Something like

    >>> from pyformance import counter, count_calls
    >>> @count_calls(metric_name="test.count")
    ... def test():
    ...     pass
    ...
    >>> for i in range(10):
    ...     test()
    ...
    >>> print counter("test.count").get_count()
    10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions