[ 
https://issues.apache.org/jira/browse/LANG-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032814#comment-18032814
 ] 

Edwin Delgado H commented on LANG-1504:
---------------------------------------

I created this new [PR|https://github.com/apache/commons-lang/pull/1473] that 
is based on this another one 
[#482|https://github.com/apache/commons-lang/pull/482] created 5 years ago, 
since the fork belongs to another DEV it was not possible to cherry-pick it and 
It seems the previous owner didn't reply on this ticket.

I'm happy to contribute on this feature, any feedback will be fixed / pushed as 
soon as I have available time, thanks!

> StopWatch: steps feature
> ------------------------
>
>                 Key: LANG-1504
>                 URL: https://issues.apache.org/jira/browse/LANG-1504
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.time.*
>            Reporter: Topera
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Would be great if we could use StopWatch to track times on many places of our 
> code.
> I created a new feature called "*steps*". 
>  
> With this feature we can add label to each step and then get a report with 
> time between each step.
>  
> Example:
> {code:java}
> final StopWatch watch = new StopWatch();
> watch.step("starting");
> exampleGoSleep();
> watch.step("sleeping");
> exampleGoWalk();
> watch.step("walking ");
> exampleGoDance();
> watch.step("dancing ");
> System.out.println(watch.getStepsReport());
> {code}
> The output would be:
> {noformat}
> [starting] 0ms
> [sleeping] 235ms
> [walking ] 20ms
> [dancing ] 458ms
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to