Skip to content

perf: cache datetime formatter in __time function - #5934

Merged
vlsi merged 1 commit into
apache:masterfrom
vlsi:timefunction_cache
May 19, 2023
Merged

perf: cache datetime formatter in __time function#5934
vlsi merged 1 commit into
apache:masterfrom
vlsi:timefunction_cache

Conversation

@vlsi

@vlsi vlsi commented May 19, 2023

Copy link
Copy Markdown
Collaborator

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 <felix.schumacher@internetallee.de>

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