From issues-return-54721-archive-asf-public=cust-asf.ponee.io@geode.apache.org Wed Oct 23 23:21:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9845F180608 for ; Thu, 24 Oct 2019 01:21:03 +0200 (CEST) Received: (qmail 74399 invoked by uid 500); 23 Oct 2019 23:21:02 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 74382 invoked by uid 99); 23 Oct 2019 23:21:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Oct 2019 23:21:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E99BDE3124 for ; Wed, 23 Oct 2019 23:21:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id BA4A4780579 for ; Wed, 23 Oct 2019 23:21:00 +0000 (UTC) Date: Wed, 23 Oct 2019 23:21:00 +0000 (UTC) From: "ASF subversion and git services (Jira)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-7184) Add function execution timers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEODE-7184?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1695= 8348#comment-16958348 ]=20 ASF subversion and git services commented on GEODE-7184: -------------------------------------------------------- Commit 7c70b61d8510ce5c79246f21e9a0bb8cfd452439 in geode's branch refs/head= s/feature/GEODE-7286 from Aaron Lindsey [ https://gitbox.apache.org/repos/asf?p=3Dgeode.git;h=3D7c70b61 ] GEODE-7184: Fix failing windows CI jobs Thread.sleep() is not guaranteed to sleep for the given duration. Add new method for testing which sleeps for at least as long as the given duration. Co-authored-by: Aaron Lindsey Co-authored-by: Kirk Lund > Add function execution timers > ----------------------------- > > Key: GEODE-7184 > URL: https://issues.apache.org/jira/browse/GEODE-7184 > Project: Geode > Issue Type: Improvement > Reporter: Aaron Lindsey > Assignee: Aaron Lindsey > Priority: Major > Time Spent: 5h 40m > Remaining Estimate: 0h > > Developers oftentimes deploy their own functions to the system to enable = decorator pattern for caching to add information to specific key/value pair= s. In doing so, they can introduce bottlenecks into the system where server= -side functions can cause issues or make things slower than intended. We wa= nt a way that users can view functions that they create, and see what the a= verage execution time looks like. > * *Meter Type*: Timer > * *Name*: geode.function.executions > * *Description*: TBD > * *Tags*: , function (getId on function, if DNE present get= Class.getname of deployed function), succeeded (true/false) > h3. Acceptance Criteria > *Meter creation/deletion*: Create meter on function execution > *Measurement*: On an individual server, start the timer when a=C2=A0*USER= *=C2=A0function is invoked/executed, and stop the timer when the user funct= ion completes OR errors. If it throws a Function Execution or another error= then the tag function.isSuccessful=3Dfalse > Details on Functions and their execution: [https://geode.apache.org/docs/= guide/110/developing/function_exec/function_execution.html] > h3. Scenarios > *Scenario: The timers are created when the function is first executed* > Given a user executed a function with ID functionToTime on a cluster with= 1 locator/1 server > And functionToTime has not been executed previously > Then the server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D true > - count > 1 > - totalTime >=3D 5,000,000,000ns > And the server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D false > - count =3D 0 > - totalTime =3D 0 > *Scenario: Successful singular function execution (registered execution)* > Given a user registers a function with ID functionToTime (that waits for = 5 seconds) on a cluster with 1 locator/1 server > When functionToTime is triggered using gfsh command: "execute function --= id=3DfunctionToTime" > And the function completes without error > Then the server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D true > - count =3D 1 > - totalTime >=3D 5,000,000,000ns > *Scenario: Successful singular function execution (unregistered execution= )* > Given an unregistered function with ID functionToTime (that waits for 5 s= econds) exists=20 > When triggered on a client using "FunctionService.onServers(cache).execu= te(new FunctionToTime())" > And the function completes without error > Then the server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D true > - count =3D 1 > - totalTime >=3D 5,000,000,000ns > *Scenario: Singular function execution with Any Exception* > Given an unregistered function with ID functionToTime (that waits for 5 s= econds) exists=20 > When triggered on a client using "FunctionService.onServers(cache).execu= te(new FunctionToTime())" > And the function exits with a Any exception error after running for 5 sec= onds > Then the server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D false > - count =3D 1 > - totalTime >=3D 5,000,000,000ns > *Scenario: Function execution onRegion multi-server* > Given a cluster with 1 locator (named L1) as well as 2 servers (named S1,= S2) > And a region called RR1 that is a replicate region > When a function execution is triggered against that replicate region usin= g "FunctionService.onRegion(regionRR1).execute(new FunctionToTime())" > Then one server has the following timer: > - name: geode.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D true > - count =3D 1 > - totalTime >=3D 5,000,000,000ns > And the other server has the following timer: > - name: geode.cache.function.executions > - tag: id =3D functionToTime > - tag: succeeded =3D true > - count =3D 0 > - totalTime =3D 0 > *Scenario: Function execution onRegion with partition region multiple tim= es* > *Scenario: Function execution onRegion multi-server* > Given a cluster with 1 locator (named L1) as well as 2 servers (named S1,= S2) > And a partition region called PR1 that only exists on S1 > When a function execution is triggered 10 times against that replicate re= gion using "FunctionService.onRegion(regionPR1).execute(new FunctionToTime= ())" > Then S1 has the following timer: > - name: geode.function.executions > - tag:id =3D functionToTime > - tag:succeeded =3D true > - count =3D 10 > And S2 has the following timer: > - name: geode.cache.function.executions > - tag:id =3D functionToTime > - tag:succeeded =3D true > - count =3D 0 > *Scenario: Function execution onRegion with replicate region multiple tim= es* > *Scenario: Function execution onRegion multi-server* > Given a cluster with 1 locator (named L1) as well as 2 servers (named S1,= S2) > And a replicate region called RR1 exists > When a function execution is triggered 10 times against that replicate re= gion using "FunctionService.onRegion(regionRR1).execute(new FunctionToTime= ())" > Then when you aggregate both S1 and S2 server metrics for geode.function.= executions with id:functionToTime with succeeded:true then the total count = of the aggregate will be 10 -- This message was sent by Atlassian Jira (v8.3.4#803005)