github-actions[bot] commented on code in PR #64923:
URL: https://github.com/apache/doris/pull/64923#discussion_r3522962751
##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/action/ProfileAction.groovy:
##########
@@ -76,6 +80,26 @@ class ProfileAction implements SuiteAction {
return profileData
}
+ private String normalizeProfileText(String profileText) {
+ // Convert HTML entities and actual NBSPs to regular spaces,
+ // retain line breaks, and then compress multiple consecutive spaces
into a single space.
+ profileText = profileText.replace(" ", " ")
+ profileText = profileText.replace("</br>", "\n")
+ profileText = profileText.replace('\u00A0' as char, ' ' as char)
+ return profileText.replaceAll(" {2,}", " ")
+ }
+
+ boolean isProfileReady(String profileText, List<String> requiredContents =
[]) {
+ if (profileText == null || profileText.isEmpty()) {
+ return false
+ }
+ if (requiredContents != null && !requiredContents.isEmpty()
+ && requiredContents.every { profileText.contains(it) }) {
Review Comment:
The readiness helper should not let callers that validate merged profile
content stop on the first counter name. With `requiredContents` set, this
returns true before checking `Profile Completion State: COMPLETE`; but
`/rest/v1/query_profile/{id}` can render text while the list state is still
`COLLECTING` (`Profile.getProfileCompletionState()` only becomes `COMPLETE`
after every `ExecutionProfile` completes). That means
`adaptive_pipeline_task_serial_read_on_limit` can inspect only one scan
fragment's `MaxScanConcurrency`, and `scanner_profile` can assert `actualRows`
before the merged runtime rows have been backfilled. Please either make these
callers require completion in addition to the required strings, or add a
separate option for the few cases where "counter appeared" is enough.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]