You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2017/04/03 14:00:47 UTC

[jira] [Comment Edited] (OAK-6020) add a Guava Stopwatch like duration formatter

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

Vikas Saurabh edited comment on OAK-6020 at 4/3/17 2:00 PM:
------------------------------------------------------------

A minor point wrt to what I see in tests - the tests suggest comma at thousands. I'm not completely sure of all the use-case, -but I think that would screw up simple sorting using {{sort -nk}} pattern (there could be a flag in sort that I'm missing though)-.
Ignore that as it seems sort is smart:
{noformat}$ sort -nk1 <<EOF
> 1 0000
> 1,000
> 10
> 10,000
> EOF
1 0000
10
1,000
10,000
{noformat}


was (Author: catholicon):
A minor point wrt to what I see in tests - the tests suggest comma at thousands. I'm not completely sure of all the use-case, but I think that would screw up simple sorting using {{sort -nk}} pattern (there could be a flag in sort that I'm missing though).

> add a Guava Stopwatch like duration formatter
> ---------------------------------------------
>
>                 Key: OAK-6020
>                 URL: https://issues.apache.org/jira/browse/OAK-6020
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: commons
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>              Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4, candidate_oak_1_6
>         Attachments: OAK-6020.diff
>
>
> The duration formatter in {{com.google.common.base.Stopwatch}} can only be sued when we indeed have a {{Stopwatch}} object, which is not always the case.
> {{org.apache.jackrabbit.oak.management.ManagementOperation}} has similar code already.
> Proposal: move that code into a separate generic class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)