Skip to content
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

perf: cache datetime formatter in __time function #5934

Merged
merged 1 commit into from
May 19, 2023

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented May 19, 2023

Previous JMeter version used SimpleDateFormat for the time format, and u had a different meaning.
We log a warning only at the first encounter of a problematic pattern.

This implementation has a few loopholes/problems:

  • 'u' could still be used for something different and the year could be coming from a 'YYYY' format string

Co-authored-by: Felix Schumacher

Part of #5694
Closes #5796

@vlsi vlsi added this to the 5.6 milestone May 19, 2023
@vlsi vlsi force-pushed the timefunction_cache branch from f7e875d to e1424af Compare May 19, 2023 11:44
@vlsi vlsi force-pushed the timefunction_cache branch from e1424af to 335aeac Compare May 19, 2023 11:58
Previous JMeter version used SimpleDateFormat for the time format,
and u had a different meaning.
We log a warning only at the first encounter of a problematic pattern.

This implementation has a few loopholes/problems:
 * 'u' could still be used for something different and the year
   could be coming from a 'YYYY' format string

Co-authored-by: Felix Schumacher <[email protected]>

Part of apache#5694
Closes apache#5796
@vlsi vlsi force-pushed the timefunction_cache branch from 335aeac to 52116c9 Compare May 19, 2023 12:30
@vlsi vlsi merged commit 6e637e9 into apache:master May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant