Metric enhancement - use FQCN plus method name as metrics label · Issue #1332 · actframework/actframework · GitHub
Skip to content

Metric enhancement - use FQCN plus method name as metrics label #1332

Open

Description

@greenlaw110

Metric enhancement

  1. If no measure tag specified in @MeasureTime or @MeasureCount, it shall use ${class.simpleName}.${methodName} as tag, instead of ${methodName}

  2. Allow it to toggle measure time of every function call at runtime for any method even without @MeasureTime specified.

Activity

  1. self-assigned this
    on Apr 22, 2020
  2. added this to the 1.9.3 milestone on Nov 26, 2022
  3. greenlaw110 commented on Dec 4, 2022

    @greenlaw110
    ContributorAuthor

    Before fix:

    GH1332[2CmLfs0j9]>.amtl
    +----------------------------------------------------+-------------+-------+---------+
    |                        NAME                        | ACCUMULATED | COUNT |   AVG   |
    +----------------------------------------------------+-------------+-------+---------+
    | act:http:act:http:com.mycom.gh1322.AppEntry.getFoo | 40.93ms     |     1 | 40.93ms |
    | act:http:act:http                                  | 40.93ms     |     1 | 40.93ms |
    | act:http:act                                       | 41.05ms     |     2 | 20.52ms |
    | act:http                                           | 41.05ms     |     2 | 20.52ms |
    | act                                                | 632.39ms    |   103 | 6.13ms  |
    | app:foo                                            | 0.10ms      |     1 | 0.10ms  | <<<<<<
    | app                                                | 0.10ms      |     1 | 0.10ms  |
    | act:http:act:routing                               | 0.11ms      |     1 | 0.11ms  |
    +----------------------------------------------------+-------------+-------+---------+
    
  4. greenlaw110 commented on Dec 4, 2022

    @greenlaw110
    ContributorAuthor

    After fix:

    GH1332[2CmLfs1ja]>.amtl
    +----------------------------------------------------+-------------+-------+---------+
    |                        NAME                        | ACCUMULATED | COUNT |   AVG   |
    +----------------------------------------------------+-------------+-------+---------+
    | act:http:act:http:com.mycom.gh1322.AppEntry.getFoo | 69.85ms     |     2 | 34.92ms |
    | act:http:act:http                                  | 69.85ms     |     2 | 34.92ms |
    | act:http:act                                       | 70.07ms     |     4 | 17.51ms |
    | act:http                                           | 70.07ms     |     4 | 17.51ms |
    | act                                                | 1.16s       |   206 | 5.67ms  |
    | app:foo                                            | 0.10ms      |     1 | 0.10ms  |
    | app:com.mycom.gh1322.AppEntry.foo                  | 0.05ms      |     1 | 0.05ms  | <<<<<
    | app                                                | 0.16ms      |     2 | 0.08ms  |
    | act:http:act:routing                               | 0.21ms      |     2 | 0.10ms  |
    +----------------------------------------------------+-------------+-------+---------+
    Items found: 9
    
  5. changed the title [-]Metric enhancement[/-] [+]Metric enhancement - use FQCN plus method name as metrics label[/+] on Dec 4, 2022
  6. added a commit that references this issue on Dec 4, 2022
    014bd59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions