vlsi commented on code in PR #5796: URL: https://github.com/apache/jmeter/pull/5796#discussion_r1148826181
########## src/functions/src/main/java/org/apache/jmeter/functions/TimeFunction.java: ########## @@ -96,13 +99,17 @@ public String execute(SampleResult previousResult, Sampler currentSampler) throw long div = Long.parseLong(fmt.substring(1)); // should never case NFE datetime = Long.toString(System.currentTimeMillis() / div); } else { - if (fmt.contains("u")) { + DateTimeFormatter df = DateTimeFormatter + .ofPattern(fmt); Review Comment: We could probably move the initialization of `DateTimeFormatter` to something like "once for a given pattern" since `DateTimeFormatter` is thread-safe. That might be a task for another PR though. -- 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: dev-unsubscr...@jmeter.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org