-
Notifications
You must be signed in to change notification settings - Fork 4
Davids/optimize #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: aash/optimize
Are you sure you want to change the base?
Davids/optimize #763
Conversation
Generate changelog in
|
|
|
||
| private static final String WITCHCRAFT_LOG_PATTERN_STRING = "\\{.*?\"type\"\\s*?:\\s*?\"(" | ||
| + LOG_TYPES.stream().map(Pattern::quote).collect(Collectors.joining("|")) + ")\".*?}"; | ||
| + LOG_TYPES.stream().map(Pattern::quote).collect(Collectors.joining("|")) + ")\".*?}\\s*"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handles matching log lines including trailing newline
| public void write(String str, int off, int len) { | ||
| synchronized (lock) { | ||
| for (int startIndex = off; startIndex < off + len; ) { | ||
| int newLineIndex = str.indexOf('\n', startIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is vectorized search over underlying bytes
| lineBuffer.append(str, startIndex, off + len); | ||
| return; | ||
| } else { | ||
| lineBuffer.append(str, startIndex, newLineIndex + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows bulk array copy from String to StringBuilder
| if (delegate instanceof TestReporter testReporter) { | ||
| testReporter.generateReport(new FormattingTestResultsProvider(testResultsProvider), file); | ||
| } else if (delegate instanceof HtmlTestReport htmlTestReport) { | ||
| htmlTestReport.generateReport(new FormattingTestResultsProvider(testResultsProvider), file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by cleanup
|
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Before this PR
Comments on #737
After this PR
==COMMIT_MSG==
==COMMIT_MSG==
Possible downsides?