actframework
actframework copied to clipboard
Metric enhancement - use FQCN plus method name as metrics label
Metric enhancement
-
If no measure tag specified in
@MeasureTime
or@MeasureCount
, it shall use${class.simpleName}.${methodName}
as tag, instead of${methodName}
-
Allow it to toggle measure time of every function call at runtime for any method even without
@MeasureTime
specified.
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 |
+----------------------------------------------------+-------------+-------+---------+
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