[
https://issues.apache.org/jira/browse/LANG-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16342878#comment-16342878
]
ASF GitHub Bot commented on LANG-1373:
--------------------------------------
GitHub user ottobackwards reopened a pull request:
https://github.com/apache/commons-lang/pull/311
LANG-1373 Stopwatch based capability for nested, named, timings
There are times when you want to do a number or related timings across a
sequence of calls or operations. This is difficult to do with just the
StopWatch.
StackWatch provides an abstraction over the StopWatch class that allows
callers to create multiple named and possibly nested timing operations.
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, and timings may be tagged to allow the
consumer to filter the results.
I have built this in my personal travis and all three jobs pass
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ottobackwards/commons-lang stackwatch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/311.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #311
----
commit dd09e9225aba05e854fb1b8a4611450248d38dd3
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-03T17:19:07Z
StackWatch implementation and tests
commit ddaab51568ab01fc883d30e66394a669a75e24cc
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-03T19:30:28Z
fix wording in javadoc
commit 25a0b403861c8be1937e1e06ec51ff2eeeecfaf0
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-09T14:40:20Z
refactor default value and constructor check
commit 95adfbe002d12d685ffec7d80aaddc61c77983c1
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-27T15:21:28Z
formatting changes and checkstyle checks
this is 2 space indented as far as I can tell
commit 41b2e28fc947cbeb3b8dd10804b1c0deea72d482
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-27T22:07:35Z
fix tabs/spaces to 4
commit 3e951f1d1b79e9cab8672162910c58f9ff551e98
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-27T22:46:18Z
per review: prefer ArrayList to LinkedList, return immutable sets
commit 9df107c2ec22106db9c379745110891d79f5d36e
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T02:15:16Z
more testing
fix test names
commit 425fc3ea51e1f9d8cf99f2147c0da7cd9aebf6ab
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T02:16:12Z
fix spaces
commit f372ca91b477d953716fa81b5ce88d15036b3964
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T02:17:16Z
fixed extra space
commit 4e10d1e7fa6a26ee25d431dbcf8c0522a1229ec6
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T02:40:24Z
add more testing
commit ff41d9dad12f8f7cc14a4cfe63f1fe38bfd6fe27
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T03:16:07Z
test coverage work
commit a3a6869d9896ddd85fd05bfd899b2a82c328f766
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T03:20:03Z
javadoc fixes from report
commit 78fa7461c14a54aa76a6e9c4a8d2225e1fe2572e
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T03:36:10Z
more coverage changes
commit 26d670489319e2e5ae7a4cee811f91d84af5f9dc
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T03:56:37Z
last bit to get coverage to 100%
commit 6b52c4385809d65582c051ad77ed6065c60f2d91
Author: Otto Fowler <ottobackwards@...>
Date: 2018-01-28T04:49:58Z
fix javadoc so @Override shows correctly
----
> Stopwatch based capability for nested, named, timings in a call stack
> ---------------------------------------------------------------------
>
> Key: LANG-1373
> URL: https://issues.apache.org/jira/browse/LANG-1373
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.time.*
> Reporter: Otto Fowler
> Priority: Major
>
> While working on adding some timing functionality to a Metron feature, I came
> across the
> Stopwatch class, but found that it didn’t suite my needs.
> What I wanted to do was to create a timing from a top level function in our
> Stellar 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.
> <…>
> This class may be more generally useful to this and other projects, but I am
> not sure where it would live since we wouldn’t want it in common.
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)