From dev-return-166581-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Mar 2 15:31:52 2018 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 mx-eu-01.ponee.io (Postfix) with SMTP id B1F63180671 for ; Fri, 2 Mar 2018 15:31:51 +0100 (CET) Received: (qmail 29249 invoked by uid 500); 2 Mar 2018 14:31:50 -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 29237 invoked by uid 99); 2 Mar 2018 14:31:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2018 14:31:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5D37CC00D7 for ; Fri, 2 Mar 2018 14:31:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=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: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Xok0EE8eiBAy for ; Fri, 2 Mar 2018 14:31:45 +0000 (UTC) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D0C6E5F39F for ; Fri, 2 Mar 2018 14:31:44 +0000 (UTC) Received: by mail-io0-f178.google.com with SMTP id p78so10777007iod.13 for ; Fri, 02 Mar 2018 06:31:44 -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 :cc; bh=TLIZoHdUG9q/zSFVxaxyTPiTg2qQJKPsxspd0EBCR6k=; b=VEMHhFmJS9bdHaVAX8BorLdmu+lEyVDC4JwXzavirarXjebca4mi+Pu5aBT6/ZQBdr 6oNdXIV1Uc+YV5LfuGwiGjNJbtQhEk0YacYbO3BTfwtgrj/1OYeY8dVyDqAAn8NxwzJ9 OJNYE9Z2Ec5xc4q9zgH9xdLp1PqFGsdRb5azmZLMwtYnXSCjN77DBDgcFqDhoSPEpW61 rQwx0QlJXM7MWt66gfmXbC1p7aEnBNBPpMYlb2O9PaBlswbpocLFV/rFErzlH4PZmD4W GU1hmOqThvGOsX16AlXcdwzQl1FKnCgheW4w1jA9GkuOEXfjO6PCytkcmUFVt/L6o/bn uuUg== 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:cc; bh=TLIZoHdUG9q/zSFVxaxyTPiTg2qQJKPsxspd0EBCR6k=; b=Cw3HhdKVvBA3+FkTcfIYQYgUJAbKMd++HKJkxUaWvn/5IKlt+jVcO+D0NDSSp5BxLV cgAy/8Qa+GyHBoy8JaYeuEi8Ff4MelcrIH1GFnD9FdwEaGkbb6d1MeL1D9aAVXi2l4rh GXOKRS68zwJzZkzS4JiPvKqBjZzmbpbpz5rIzBClxLUCyj6iUDQgfJM34QCSddzKqR4t L+ofwRkHSGhXGXH+Xu2eZAYmPNtko6+hBqST/VRuXunsOwskjCw6LD0Lj6SvSRhrummG nHtCvvbfb3n6UzLPP7PLTp5MJiCcCFKwKfsqomf8ZpB2+Pa1C9zKvN8RR5t0nekI2L4e hoqw== X-Gm-Message-State: APf1xPCcqKOxwgo5deFjonLuF2lJ/ARuJBYTjfCHPTvXh/S1NQUZ8WIA zjTaSc7+RSOdUQTPS86vcnQpCR5wKRDgCgdsjtQ= X-Google-Smtp-Source: AG47ELvauIwlanFMIVBTGiJeum8WePgXSY9kv8CJDZltmuQyXn2N0+WclsPNSQiBbEQoBMetsz7Ih8flqYTHTqc97wE= X-Received: by 10.107.17.20 with SMTP id z20mr6797477ioi.274.1520001104137; Fri, 02 Mar 2018 06:31:44 -0800 (PST) Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Fri, 2 Mar 2018 06:31:43 -0800 From: Otto Fowler In-Reply-To: References: <4b5f5b5351e493ca4002eb1a101d2c3d@scarlet.be> X-Mailer: Airmail (467) MIME-Version: 1.0 Date: Fri, 2 Mar 2018 06:31:43 -0800 Message-ID: Subject: Re: [DISCUSS] new component for timing? To: Romain Manni-Bucau Cc: Commons Developers List Content-Type: multipart/alternative; boundary="001a113eda8aded50c05666ed52a" --001a113eda8aded50c05666ed52a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don=E2=80=99t understand the options that we are discussing here. Can we= clarify? * create a new component from sirota, bringing it into commons ( resurrect commons-monitoring ) and put StackWatch there? On March 2, 2018 at 08:49:03, Romain Manni-Bucau (rmannibucau@gmail.com) wrote: This i right but it started as just a few utilities and interception modules, then it grows as any performance related project. We also have skywalking which is quite big but can host all that utility part @asf. Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn | Book 2018-03-02 14:45 GMT+01:00 Otto Fowler : > My understanding is that sirona was/is a complete system, as opposed to a > collection of utilities. > If StackWatch is too big for LANG it seems too small for sirona. Along > with sirona being retired etc. > > > > On February 28, 2018 at 15:06:52, Romain Manni-Bucau ( > rmannibucau@gmail.com) wrote: > > Le 28 f=C3=A9vr. 2018 19:27, "Matt Sicker" a =C3=A9cri= t : > > This sounds almost like a sort of Commons Metrics type project. See < > http://metrics.dropwizard.io/4.0.0/> for an example. There's a sandbox > project called Commons Monitoring which may be similar. > > > Sirona started from commons-monitoring ;) > > > > On 28 February 2018 at 10:56, Gilles wrote= : > > > On Wed, 28 Feb 2018 17:24:29 +0100, Romain Manni-Bucau wrote: > > > >> 2018-02-28 17:11 GMT+01:00 Gilles : > >> > >> On Wed, 28 Feb 2018 16:59:08 +0100, Romain Manni-Bucau wrote: > >>> > >>> Hi guys, > >>>> > >>>> On that topic we can keep in mind we retired not a lot time ago Apac= he > >>>> Sirona which was a perf framework industrializing a stopwatch to > >>>> summarize > >>>> it. > >>>> We can make it live again and would probably be a better fir than > >>>> commons > >>>> cause you quickly need more than just some time measurement when you > >>>> start > >>>> to work on these topics. > >>>> > >>>> > >>> Why was the project terminated? > >>> > >>> > >> Community didn't grow enough and activity was not that high - the > project > >> went stable pretty quickly. I forked it on github for now > >> https://github.com/rmannibucau/sirona > >> > > > > Does it contain a feature similar to the "StackWatch" > > proposed in > > https://issues.apache.org/jira/browse/LANG-1373 > > ? > > > > If so, do you suggest that Otto's project should depend > > on Sirona? > > > > If not, do you suggest that Otto should submit the PR > > to Sirona (and then depend on it)? > > > > > > Gilles > > > > > >>> > >>> Just my 2 cts > >>>> > >>>> > >>>> Romain Manni-Bucau > >>>> @rmannibucau | Blog > >>>> | Old Blog > >>>> | Github > >>>> | > >>>> LinkedIn | Book > >>>> > >>>> >>>> high-performance> > >>>> > >>>> > >>>> 2018-02-28 16:56 GMT+01:00 Gary Gregory : > >>>> > >>>> On Wed, Feb 28, 2018 at 6:35 AM, Gilles > > >>>> > >>>>> wrote: > >>>>> > >>>>> > Hello. > >>>>> > > >>>>> > On Wed, 28 Feb 2018 04:56:36 -0800, Otto Fowler wrote: > >>>>> > > >>>>> >> Hi, > >>>>> >> > >>>>> >> In the course of working through my pull request for adding new > LANG > >>>>> >> functionality on top of the StopWatch class, the issue has been > >>>>> raise > >>>>> as > >>>>> >> to > >>>>> >> if this functionality is =E2=80=98common=E2=80=99 or should > >>>>> >> be placed in a more specialized commons-xxxx component. > >>>>> >> > >>>>> >> We would like to take the discussion to the list for this, and s= ee > >>>>> what > >>>>> >> everyone thinks. > >>>>> >> > >>>>> >> The StackWatch provides for tracking nested timings backed by > >>>>> StopWatch. > >>>>> >> You can start the watch, and start and stop multiple timings > through > >>>>> the > >>>>> >> call stack. Each timing is named and tag and has it=E2=80=99s ow= n time. > >>>>> >> You can visit all the timings, perhaps using the tags to filter > when > >>>>> you > >>>>> >> are done. Please see the PR/Jira for more details. You should > look > >>>>> at > >>>>> >> both, since the review has been split between the two. > >>>>> >> > >>>>> >> If not LANG, then where? The commons-testing component has been > >>>>> >> mentioned. But this code is not =E2=80=98test=E2=80=99 code expl= icitly. In my use > >>>>> case ( > >>>>> >> I wrote this for the Apache Metron project and thought it might = be > >>>>> useful > >>>>> >> here) it would not be test code, in the sense that it would be > used > >>>>> in > >>>>> >> =E2=80=98test=E2=80=99 scope in mvn. Rather it would be deployed= in production, in > >>>>> a > >>>>> >> REPL, > >>>>> >> and perhaps in other runtime components. > >>>>> >> > >>>>> > > >>>>> > Part of what makes a good component is that it does not dictate > >>>>> > how and where applications should use it. > >>>>> > The name "Testing" does not imply that its contents must be used > >>>>> > within "test" scope. > >>>>> > > >>>>> > A utility such as "StackWatch" could be another tool to integrate > >>>>> > in a unit test suite (e.g. to generate a more fine-grained timing > >>>>> > report than Junit does). Hence the module in which "StackWatch" > >>>>> > will belong is to become a dependency of modules that target > >>>>> > specific test framework (and that is true whether the former is > >>>>> > defined within "Testing" or in another component). > >>>>> > > >>>>> > I would not want to pull in junit > >>>>> >> or other dependencies with any component containing it. > >>>>> >> > >>>>> > > >>>>> > +1 > >>>>> > Must be ensured by proper granularity of the modular design. > >>>>> > > >>>>> > If we put it in commons-testing ( which already has sub-modules > which > >>>>> are > >>>>> >> geared towards junit ) it may be confusing, even if the module i= s > >>>>> explicit > >>>>> >> about purpose and keeping out junit dependent code ( or other > >>>>> testing > >>>>> >> code). > >>>>> >> > >>>>> > > >>>>> > Why would it be confusing? The module will stand out on its own > >>>>> > (artefact/description/doc/web site) and be more visible than yet > >>>>> > another class in the already too large "Commons Lang". > >>>>> > > >>>>> > Also, besides the StackWatch, what else would go into the new > target > >>>>> >> component? Would StopWatch move as well for example? > >>>>> >> > >>>>> > > >>>>> > +1 > >>>>> > But creating a new component for two small classes can reasonably > >>>>> > be argued as overkill. > >>>>> > FTR: I was asked to collect the sampling utilities within a > >>>>> > module of "Commons RNG" even though it could have warranted its > >>>>> > own component (being a plain "client" of the core functionality > >>>>> > of [RNG]). In the present case, "StackWatch" would belong to > >>>>> > "core" utilities of "Testing" that are pulled (along with other > >>>>> > dependencies by the more specific modules. > >>>>> > > >>>>> > >>>>> I would ask all of us to step back for a moment and consider the bi= g > >>>>> picture. > >>>>> > >>>>> Specifically, what do you consider the mandate or guidelines for > >>>>> Commons > >>>>> Lang to be? For me, this is code that should or could have been in > the > >>>>> JRE > >>>>> in java.lang or java.util. Looking ahead to Java 9, Commons Lang > should > >>>>> likely only depend on java.base (it does today but this should be > >>>>> enforced > >>>>> with the Maven JDeps Plugin IMO.) > >>>>> > >>>>> If you look at StringUtils, you can then see how this class has gro= wn > >>>>> into > >>>>> a giant. You can also then see why other related code like a fancie= r > >>>>> String.replace() could creep in as StrSubstitutor and friends. Shou= ld > >>>>> variable interpolation have been in the JRE? Debatable, but it woul= d > be > >>>>> useful on top of Properties and ResourceBundle, one might argue; al= so > >>>>> handy > >>>>> for JAXB I would say. Nevertheless, WRT to Commons Lang, we -- > rightly > >>>>> IMO > >>>>> -- have deprecated StrSubstitutor in Commons Lang in favor or its n= ew > >>>>> home > >>>>> in Commons Text, where is has evolved further. > >>>>> > >>>>> In my view, StopWatch and now StackWatch, do not belong in the JRE = or > >>>>> Commons Lang. It should sit slightly above that level. Where, is th= e > >>>>> question. > >>>>> > >>>>> Commons Testing for Stop/StackWatch does not seen quite right to me= . > I > >>>>> could see a new Commons Timing or a more general Commons Measuremen= t; > >>>>> with > >>>>> a mandate NOT to overlap with Joda-Time and java.time. > >>>>> > >>>>> Gary > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > Gilles > >>>>> > > >>>>> > > >>>>> >> https://issues.apache.org/jira/browse/LANG-1373 > >>>>> >> > >>>>> >> >>>>> >> atlassian.jira.plugin.system.issuetabpanels%3Acomment- > >>>>> >> tabpanel&focusedCommentId=3D16377279#comment-16377279> > >>>>> >> https://github.com/apache/commons-lang/pull/311 > >>>>> >> > >>>>> > > >>>>> > > >>>>> > >>>>> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > > For additional commands, e-mail: dev-help@commons.apache.org > > > > > > > -- > Matt Sicker > > --001a113eda8aded50c05666ed52a--