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

Michael McCandless commented on LUCENE-6564:
--------------------------------------------

Oh that's bad bad bad that SimpleDateFormat is not thread safe.

But I do find msec time to be helpful when debugging tests ... I don't think we 
should make tests even harder to debug.

What if we switch to a simple "seconds since start"?  E.g.:

{noformat}
IW 2 [0.0327s; main]: now flush at close
IW 2 [0.0328s; main]:   start flush: applyAllDeletes=true
IW 2 [0.0329s; main]:   index before flush
DW 2 [0.0330s; main]: startFullFlush
DW 2 [0.0331s; main]: anyChanges? numDocsInRam=1 deletes=false hasTickets:false 
pendingChangesInFullFlush: false
DWFC 2 [0.0333s; main]: addFlushableState DocumentsWriterPerThread 
[pendingDeletes=gen=0, segment=_0, aborted=false, numDocsInRAM=1, 
deleteQueue=DWDQ: [ generation: 0 ]]
DWPT 2 [0.0351s; main]: flush postings as segment _0 numDocs=1
DWPT 2 [0.0604s; main]: new segment has 0 deleted docs
DWPT 2 [0.0606s; main]: new segment has no vectors; norms; no docValues; prox; 
freqs
DWPT 2 [0.0607s; main]: flushedFiles=[_0.nvd, _0.fdx, _0_Memory_0.ram, _0.fdt, 
_0.nvm, _0.fnm]
{noformat}

> Normalize date format for IW in unit tests
> ------------------------------------------
>
>                 Key: LUCENE-6564
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6564
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: general/test
>            Reporter: Ramkumar Aiyengar
>            Assignee: Ramkumar Aiyengar
>            Priority: Minor
>             Fix For: 5.3
>
>         Attachments: LUCENE-6564.patch
>
>
> Noticed while debugging some IW output in an unit test that milliseconds were 
> not output in the date, changed this to reuse the date format used by 
> {{PrintStreamInfoStream}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to