Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6EDBC200BC3 for ; Fri, 18 Nov 2016 11:45:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6D4A9160B04; Fri, 18 Nov 2016 10:45:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8F900160AFE for ; Fri, 18 Nov 2016 11:45:51 +0100 (CET) Received: (qmail 77037 invoked by uid 500); 18 Nov 2016 10:45:50 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 77017 invoked by uid 99); 18 Nov 2016 10:45:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 10:45:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9E7281A0269 for ; Fri, 18 Nov 2016 10:45:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.018 X-Spam-Level: X-Spam-Status: No, score=-5.018 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9zlgiQOq5GR7 for ; Fri, 18 Nov 2016 10:45:47 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id EBCCC5FC64 for ; Fri, 18 Nov 2016 10:45:40 +0000 (UTC) Received: (qmail 76965 invoked by uid 99); 18 Nov 2016 10:45:40 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 10:45:40 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 24C551CC185; Fri, 18 Nov 2016 10:45:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4480171748694175357==" MIME-Version: 1.0 Subject: Re: Review Request 53724: ATLAS-1116 Performance monitoring of backend methods in API requests From: Shwetha GS To: Vimal Sharma , Apoorv Naik , atlas , Shwetha GS Date: Fri, 18 Nov 2016 10:45:39 -0000 Message-ID: <20161118104539.20485.80673@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Shwetha GS X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/53724/ X-Sender: Shwetha GS References: <20161116093323.20485.79406@reviews.apache.org> In-Reply-To: <20161116093323.20485.79406@reviews.apache.org> X-ReviewBoard-Diff-For: server-api/src/main/java/org/apache/atlas/metrics/Metrics.java X-ReviewBoard-Diff-For: server-api/src/main/java/org/apache/atlas/aspect/Loggable.java X-ReviewBoard-Diff-For: server-api/src/main/java/org/apache/atlas/aspect/AtlasAspect.java X-ReviewBoard-Diff-For: server-api/src/test/aspect/org/apache/atlas/MonitoredAspectTest.java X-ReviewBoard-Diff-For: server-api/src/main/java/org/apache/atlas/aspect/Monitored.java Reply-To: Shwetha GS X-ReviewRequest-Repository: atlas archived-at: Fri, 18 Nov 2016 10:45:52 -0000 --===============4480171748694175357== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53724/ ----------------------------------------------------------- (Updated Nov. 18, 2016, 10:45 a.m.) Review request for atlas. Changes ------- Aspectj plugin disabled by default. Added instructions on how to enable instrumentation at compile time and to disable metrics at runtime when atlas is already instrumented. Bugs: ATLAS-1116 https://issues.apache.org/jira/browse/ATLAS-1116 Repository: atlas Description ------- 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]} Diffs (updated) ----- distro/src/conf/atlas-log4j.xml 400cd3a docs/src/site/twiki/Configuration.twiki 7f24f88 docs/src/site/twiki/InstallationSteps.twiki 4dae7a3 pom.xml 1b3975f repository/pom.xml 949118b repository/src/main/java/org/apache/atlas/repository/graph/FullTextMapper.java 053e8ac repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7e47d30 repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java ceb6011 repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java 47ae5e1 repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java cb389a9 server-api/pom.xml c183468 server-api/src/main/java/org/apache/atlas/RequestContext.java ec38c11 server-api/src/main/java/org/apache/atlas/aspect/AtlasAspect.java PRE-CREATION server-api/src/main/java/org/apache/atlas/aspect/Loggable.java PRE-CREATION server-api/src/main/java/org/apache/atlas/aspect/Monitored.java PRE-CREATION server-api/src/main/java/org/apache/atlas/metrics/Metrics.java PRE-CREATION server-api/src/test/aspect/org/apache/atlas/MonitoredAspectTest.java PRE-CREATION typesystem/src/main/resources/atlas-log4j.xml 8312657 webapp/pom.xml 2bef274 webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 79b5be4 webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 4b45927 webapp/src/main/java/org/apache/atlas/web/resources/DataSetLineageResource.java a11c0cf webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 230265b webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java 811c486 webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java ac89869 webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java e899fcf Diff: https://reviews.apache.org/r/53724/diff/ Testing ------- UT added and tested with atlas deployment Thanks, Shwetha GS --===============4480171748694175357==--