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 [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 14006160C05 for ; Wed, 3 Jan 2018 21:10:58 +0100 (CET) Received: (qmail 53976 invoked by uid 500); 3 Jan 2018 20:10:58 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 53964 invoked by uid 99); 3 Jan 2018 20:10:57 -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; Wed, 03 Jan 2018 20:10:57 +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 45FD11A0012 for ; Wed, 3 Jan 2018 20:10:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.899 X-Spam-Level: * X-Spam-Status: No, score=1.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 jbf-RV2_4fjW for ; Wed, 3 Jan 2018 20:10:55 +0000 (UTC) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7B3515F295 for ; Wed, 3 Jan 2018 20:10:54 +0000 (UTC) Received: by mail-io0-f181.google.com with SMTP id k18so3282243ioc.11 for ; Wed, 03 Jan 2018 12:10:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=W4N3mt05Wkri4Ef0Nj6G6djSVOtdTIU/h+J58RqVNdU=; b=fl0q8SvS7P0BfdO8hlOt7DDxEYhEKaMy0CcT+k8VZblEKQ8aEfBgSC5fYf4SBP9CL6 Sgya46Wm52KlqOInzfimp0GKHNyBDylRKnm19bmH6Uf/fxI6Q1vYrtHF4unEk9LDK1r3 kipazxtY850QjJZ0g2LtKPggZPMW9vE1W7Lqw0+X31JphqTFNjuK9Ss39BAY6vR3WzuC E0CzrsJf1FVGxg1yzW91/2wiYo8hak4yahpHRWDltl9P6PG+oDKGPfj8DiVyO1Pa3bTa qFoz+Mz6/vTpVNrqwHDJPi1Inw2vYsLwHaMZagpPtcjKTZ3Thru50XMRObO8vI6p57YX vOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=W4N3mt05Wkri4Ef0Nj6G6djSVOtdTIU/h+J58RqVNdU=; b=qL1zd4TqFaWmFT6PHiWhQ3Af0XCdX8G2D251ZONgrLsqu/3zob50h3sOWFRZr1BytJ R/XO3OEFTziKBJBUK3QBBKGoblkuRoQGo9Evw44w8TIk268LeZ5AoRZ3hvxLU+4NiVv2 NVDcu/A+wRoqHR2j/RbEiKGkOmPMZBT8MXr/dHAkNLTPhac5TaFguk75nAsIvAbplU+D hztTF7+ycwOW0XHPdgn5e6DAEhIqBJiKQ7DCLPJy/UVQrZxeGm0Xm9v5xINiFlTrIk/z hQvdpvcf7O8WWABTaEH37CCE48YM6IyrIoyYWMrMjrH3Lr4ip4ZkbWK9GzBSFT+/tDDx UmCw== X-Gm-Message-State: AKGB3mKqYhuWFN5Le2y/LXm4+0vBQMinUzqcMKlcLYUdpTYgisUc7LGV GxpAwlir0T0fPG1szGsZdmuuKMoBtTvtwOg72dY= X-Google-Smtp-Source: ACJfBoubwYBw3p8o5tjbxttY82Ri/6RSo1h+6riPfdvmebSU5+1UXoCUoTW5g1eVn5zkMawNhfY8+lNijU8a4qki0u0= X-Received: by 10.107.97.3 with SMTP id v3mr2888697iob.283.1515010253278; Wed, 03 Jan 2018 12:10:53 -0800 (PST) Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Wed, 3 Jan 2018 21:10:52 +0100 From: Otto Fowler In-Reply-To: <3385FE25-6328-43CE-8F82-12414D75315B@apache.org> References: <19BFE1AB-A7E3-4B1A-9525-71C1ABB2BD6D@apache.org> <3385FE25-6328-43CE-8F82-12414D75315B@apache.org> X-Mailer: Airmail (467) MIME-Version: 1.0 Date: Wed, 3 Jan 2018 21:10:52 +0100 Message-ID: Subject: Re: Hello and possible addition To: Benedikt Ritter , Commons Developers List Content-Type: multipart/alternative; boundary="089e0826394cfa54940561e4cf99" archived-at: Wed, 03 Jan 2018 20:10:59 -0000 --089e0826394cfa54940561e4cf99 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://github.com/apache/commons-lang/pull/311 On January 3, 2018 at 09:05:37, Benedikt Ritter (britter@apache.org) wrote: > Am 03.01.2018 um 15:02 schrieb Otto Fowler : > > Just to check, Java 7 is the required language level? Yes > > > On January 3, 2018 at 07:12:03, Otto Fowler (ottobackwards@gmail.com) wrote: > > While working on adding some timing functionality to a Metron feature, I > came across the > Stopwatch > < https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apa= che/commons/lang3/time/StopWatch.html> > class, but found that it didn=E2=80=99t suite my needs. > > What I wanted to do was to create a timing from a top level function in our > Stellar > < https://github.com/apache/metron/tree/master/metron-stellar/stellar-common> > dsl, and have have a group of related timings, such that the end result > was the overall time of the call, and nested timings of other calls > executed during the dsl execution of that function. These timings would all > be named, and have a path for identification and include timing the > language compiler/execution as well as the function execution itself. It > would be helpful if they were tagged in some way as well, such that the > consumer could filter during visitation. > > So I have written StackWatch to > provide this functionality, and submitted it in a Metron PR > . > > From the PR description: > StackWatch > > A set of utility classes under the new package stellar.common.timing have > been added. These provide the StackWatch functionality. > > StackWatch provides an abstraction over the Apache Commons StopWatch class > that allows callers to create multiple named and possibly nested timing > operations. > > <=E2=80=A6> > > This class may be more generally useful to this and other projects, but I > am not sure where it would live since we wouldn=E2=80=99t want it in comm= on. > > StackWatch uses a combination of Deque and a custom Tree implementation to > create, start and end timing operations. > > A Visitor pattern is also implemented to allow for retrieving the results > after the completion of the operation. > > See the StackWatch tests for examples of nested function timings. > ------------------------------ > > A quick look at the PR and it=E2=80=99s test or the github project ( they= are in > sync ) should show the idea. > > I am sending this to see if this functionality would be appropriate for > commons in some way. If so, the I can create the jira and submit the pr. > Even if it is not appropriate, any feedback or pr=E2=80=99s on the github= project > would still be most welcome. > > Thanks for all the work that has made commons so valuable to other Apache > projects and java developers in general! --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org --089e0826394cfa54940561e4cf99--