[
https://issues.apache.org/jira/browse/LANG-1576?focusedWorklogId=471213&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-471213
]
ASF GitHub Bot logged work on LANG-1576:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Aug/20 13:37
Start Date: 16/Aug/20 13:37
Worklog Time Spent: 10m
Work Description: XenoAmess commented on pull request #565:
URL: https://github.com/apache/commons-lang/pull/565#issuecomment-674527661
> I think the current huge list of input strings is more about testing
functionality rather than performance.
>
> The method only cares about 3 characters: CR, LF or something else (unless
it has a bug).
> So the performance test needs to check those in various combinations. I
think that is just 9 combinations.
Not really.
More cases are:
1. null string.
2. string of length 0 ("")
3. string of length 1 who ends with '\r'
4. string of length 1 who ends with '\n'
5. string of length 1 who ends with normal char
While 3,4,5 be actually handled by a same `if`, I'd prefer hanle them
seperately.
So do 1 and 2.
> It also needs to test the length, because that is used when doing the
substring.
> The method is likely to be used with textual input so it would make sense
to try with a selection of lengths.
> Not sure what the maximum should be, probably at least 1000, maybe
considerably more.
> It might make sense to do these as separate tests to see if the length
affects the performance.
So you mean we should add test for some specific length of strings?
For example, "a"*1024, "a"*10240" and "a"*102400"?
Fine, then I will add/rerun it if you need this data, at later today.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 471213)
Time Spent: 7h 10m (was: 7h)
> refine StringUtils.chomp
> ------------------------
>
> Key: LANG-1576
> URL: https://issues.apache.org/jira/browse/LANG-1576
> Project: Commons Lang
> Issue Type: Sub-task
> Reporter: Jin Xu
> Priority: Minor
> Time Spent: 7h 10m
> Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/565]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)