|
@@ -18337,6 +18337,25 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun
|
|
|
// Because the search instance is created locally, the search parameter is always going to be valid
|
|
|
// as long as the find instance. Only exception could be if call created a temporary class instance.
|
|
|
bool cloneSearch = false;
|
|
|
+ CHqlBoundExpr boundTimer, boundStart;
|
|
|
+ if (options.timeRegex)
|
|
|
+ {
|
|
|
+ StringBuffer regexName;
|
|
|
+ regexName.append(getOpString(expr->getOperator()));
|
|
|
+
|
|
|
+ if (pattern->queryId())
|
|
|
+ regexName.append("(").append(str(pattern->queryId())).append(")");
|
|
|
+ else if (pattern->isConstant())
|
|
|
+ {
|
|
|
+ StringBuffer patternText;
|
|
|
+ getUTF8Value(patternText, pattern);
|
|
|
+ // Replace colons in the pattern to avoid issues with scopes, and single quotes to avoid xpath quoting issues
|
|
|
+ patternText.replace(':', '_').replace('\'', '_');
|
|
|
+ regexName.append("(").append(patternText).append(")");
|
|
|
+ }
|
|
|
+
|
|
|
+ buildStartTimer(ctx, boundTimer, boundStart, regexName);
|
|
|
+ }
|
|
|
IHqlExpression * findInstance = doBuildRegexFindInstance(ctx, compiled, search, cloneSearch);
|
|
|
if(expr->queryType() == queryBoolType())
|
|
|
{
|
|
@@ -18355,6 +18374,8 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun
|
|
|
OwnedHqlExpr call = bindFunctionCall(func, args);
|
|
|
buildExprOrAssign(ctx, target, call, bound);
|
|
|
}
|
|
|
+ if (options.timeRegex)
|
|
|
+ buildStopTimer(ctx, boundTimer, boundStart);
|
|
|
}
|
|
|
|
|
|
void HqlCppTranslator::doBuildExprRegexFindReplace(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & bound)
|