[ https://issues.apache.org/jira/browse/ATLAS-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663483#comment-15663483 ]
Shwetha G S commented on ATLAS-1116: ------------------------------------ Exposes annotations @Monitored and @Loggable on methods. @Monitored records how many times that method is called and total execution time in that method. These metrics are aggregated at API level and are recorded in metric.log(one log line per API call) @Loggable logs at the beginning of the method and ending of the method with arguments and return values These annotations are injected using aspectj plugin at compile time, there is no runtime overhead except for the method invocation Example metrics collected: entity submit - 2016-11-14 16:34:06,079 {GraphHelper.findVertex=[count=3, totalTimeMSec=60], GraphHelper.setProperty=[count=15, totalTimeMSec=16], GraphHelper.createVertexWithoutIdentity=[count=1, totalTimeMSec=2], TypedInstanceToGraphMapper.createVerticesAndDiscoverInstances=[count=1, totalTimeMSec=62], TypedInstanceToGraphMapper.addOrUpdateAttributesAndTraits=[count=1, totalTimeMSec=10], GraphHelper.getSingleValuedProperty=[count=33, totalTimeMSec=3], GraphHelper.getProperty=[count=3, totalTimeMSec=0], GraphToTypedInstanceMapper.mapVertexToInstance=[count=3, totalTimeMSec=2], GraphToTyped InstanceMapper.mapVertexToInstanceTraits=[count=3, totalTimeMSec=0], GraphToTypedInstanceMapper.mapGraphToTypedInstance=[count=3, totalTimeMSec=6], FullTextMapper.mapRecursive=[count=1, totalTimeMSec=3], TypedInstanceToGraphMapper.mapTypedInstanceToGraph=[count=1, totalTimeMSec=81], EntityR esource.submit=[count=1, totalTimeMSec=892]} search - 2016-11-14 16:34:18,817 {GraphHelper.getSingleValuedProperty=[count=544, totalTimeMSec=20], GraphHelper.getProperty=[count=47, totalTimeMSec=0], GraphHelper.getAdjacentEdgesByLabel=[count=18, totalTimeMSec=3], GraphHelper.getEdgeForLabel=[count=18, totalTimeMSec=3], GraphToTypedInstanceMapper.mapVertexToInstance=[count=70, totalTimeMSec=33], GraphToTypedInstanceMapper.mapVertexToInstanceTraits=[count=47, totalTimeMSec=5], GraphToTypedInstanceMapper.mapGraphToTypedInstance=[count=47, totalTimeMSec=39], GraphHelper.getArrayElementsProperty=[count=10, totalTimeMSec=0], MetadataDiscoveryResource.searchUsingQueryDSL=[count=1, totalTimeMSec=249], MetadataDiscoveryResource.search=[count=1, totalTimeMSec=249]} > Performance monitoring of backend methods in API requests > --------------------------------------------------------- > > Key: ATLAS-1116 > URL: https://issues.apache.org/jira/browse/ATLAS-1116 > Project: Atlas > Issue Type: Bug > Reporter: Vimal Sharma > Assignee: Shwetha G S > Fix For: 0.8-incubating > > Attachments: ATLAS-1116-v2.patch, ATLAS-1116.patch > > > Time taken by methods used in API calls for add/update/delete entities and > traits need to be monitored for performance -- This message was sent by Atlassian JIRA (v6.3.4#6332)